diff --git a/current/fyne_io_fyne_v2/custom.go b/current/fyne_io_fyne_v2/custom.go new file mode 100644 index 0000000..d09bfd9 --- /dev/null +++ b/current/fyne_io_fyne_v2/custom.go @@ -0,0 +1,33 @@ +// Add your custom builtins to this file. + +package fyne_io_fyne_v2 + +import ( + "strings" + + "github.com/refaktor/rye/env" +) + +var builtinsCustom = map[string]*env.Builtin{ + "nil": { + Doc: "nil value for go types", + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + return *env.NewInteger(0) + }, + }, + "kind": { + Doc: "underlying kind of a go native", + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + nat, ok := arg0.(env.Native) + if !ok { + ps.FailureFlag = true + return env.NewError("kind: arg0: expected native") + } + s := ps.Idx.GetWord(nat.Kind.Index) + s = s[3 : len(s)-1] // remove surrounding "Go()" + s = strings.TrimPrefix(s, "*") // remove potential pointer "*" + return *env.NewString(s) + }, + }, + // Add your custom builtins here: +} diff --git a/current/fyne_io_fyne_v2/generated.go b/current/fyne_io_fyne_v2/generated.go new file mode 100644 index 0000000..e5e1ec2 --- /dev/null +++ b/current/fyne_io_fyne_v2/generated.go @@ -0,0 +1,200641 @@ +// Code generated by ryegen. DO NOT EDIT. + +// You can add custom binding code to builtins_custom.go! + +//go:build !b_no_fyne + +package fyne_io_fyne_v2 + +import ( + "embed" + "errors" + "fmt" + "fyne.io/fyne/v2" + "fyne.io/fyne/v2/app" + "fyne.io/fyne/v2/canvas" + "fyne.io/fyne/v2/container" + "fyne.io/fyne/v2/data/binding" + "fyne.io/fyne/v2/data/validation" + "fyne.io/fyne/v2/dialog" + fyne_driver "fyne.io/fyne/v2/driver" + "fyne.io/fyne/v2/driver/desktop" + "fyne.io/fyne/v2/driver/mobile" + "fyne.io/fyne/v2/driver/software" + "fyne.io/fyne/v2/lang" + "fyne.io/fyne/v2/layout" + "fyne.io/fyne/v2/storage" + "fyne.io/fyne/v2/storage/repository" + "fyne.io/fyne/v2/test" + "fyne.io/fyne/v2/theme" + "fyne.io/fyne/v2/tools/playground" + "fyne.io/fyne/v2/widget" + "github.com/refaktor/rye/env" + "github.com/refaktor/rye/evaldo" + "image" + "image/color" + "io" + "net/url" + "reflect" + "strconv" + "testing" + "time" +) + +var Builtins map[string]*env.Builtin + +func init() { + Builtins = make(map[string]*env.Builtin, len(builtinsGenerated)+len(builtinsCustom)) + for k, v := range builtinsGenerated { + Builtins[k] = v + } + for k, v := range builtinsCustom { + Builtins[k] = v + } +} + +// Force-use evaldo and env packages since tracking them would be too complicated +var _ = evaldo.BuiltinNames +var _ = env.Object(nil) + +func boolToInt64(x bool) int64 { + var res int64 + if x { + res = 1 + } + return res +} + +func objectDebugString(idx *env.Idxs, v any) string { + if v, ok := v.(env.Object); ok { + return v.Inspect(*idx) + } else { + return "[Non-object of type " + reflect.TypeOf(v).String() + "]" + } +} + +func ifaceToNative(idx *env.Idxs, v any, ifaceName string) env.Native { + rV := reflect.ValueOf(v) + var typRyeName string + var ok bool + if rV.Type() != nil { + var typPfx string + if rV.Type().Kind() == reflect.Struct { + newRV := reflect.New(rV.Type()) + newRV.Elem().Set(rV) + rV = newRV + } + typ := rV.Type() + if typ.Kind() == reflect.Pointer { + typ = rV.Type().Elem() + typPfx = "*" + } + typRyeName, ok = ryeStructNameLookup[typ.PkgPath()+"."+typPfx+typ.Name()] + } + if ok { + return *env.NewNative(idx, rV.Interface(), typRyeName) + } else { + return *env.NewNative(idx, rV.Interface(), ifaceName) + } +} + +var ryeStructNameLookup = map[string]string{ + "fyne.io/fyne/v2.*Animation": "Go(*fyne.Animation)", + "fyne.io/fyne/v2.*AppMetadata": "Go(*fyne.AppMetadata)", + "fyne.io/fyne/v2.*Container": "Go(*fyne.Container)", + "fyne.io/fyne/v2.*Delta": "Go(*fyne.Delta)", + "fyne.io/fyne/v2.*DragEvent": "Go(*fyne.DragEvent)", + "fyne.io/fyne/v2.*HardwareKey": "Go(*fyne.HardwareKey)", + "fyne.io/fyne/v2.*KeyEvent": "Go(*fyne.KeyEvent)", + "fyne.io/fyne/v2.*MainMenu": "Go(*fyne.MainMenu)", + "fyne.io/fyne/v2.*Menu": "Go(*fyne.Menu)", + "fyne.io/fyne/v2.*MenuItem": "Go(*fyne.MenuItem)", + "fyne.io/fyne/v2.*Notification": "Go(*fyne.Notification)", + "fyne.io/fyne/v2.*PointEvent": "Go(*fyne.PointEvent)", + "fyne.io/fyne/v2.*Position": "Go(*fyne.Position)", + "fyne.io/fyne/v2.*ScrollEvent": "Go(*fyne.ScrollEvent)", + "fyne.io/fyne/v2.*ShortcutCopy": "Go(*fyne.ShortcutCopy)", + "fyne.io/fyne/v2.*ShortcutCut": "Go(*fyne.ShortcutCut)", + "fyne.io/fyne/v2.*ShortcutHandler": "Go(*fyne.ShortcutHandler)", + "fyne.io/fyne/v2.*ShortcutPaste": "Go(*fyne.ShortcutPaste)", + "fyne.io/fyne/v2.*ShortcutRedo": "Go(*fyne.ShortcutRedo)", + "fyne.io/fyne/v2.*ShortcutSelectAll": "Go(*fyne.ShortcutSelectAll)", + "fyne.io/fyne/v2.*ShortcutUndo": "Go(*fyne.ShortcutUndo)", + "fyne.io/fyne/v2.*Size": "Go(*fyne.Size)", + "fyne.io/fyne/v2.*StaticResource": "Go(*fyne.StaticResource)", + "fyne.io/fyne/v2.*TextStyle": "Go(*fyne.TextStyle)", + "fyne.io/fyne/v2/app.*SettingsSchema": "Go(*app.SettingsSchema)", + "fyne.io/fyne/v2/canvas.*Circle": "Go(*canvas.Circle)", + "fyne.io/fyne/v2/canvas.*Image": "Go(*canvas.Image)", + "fyne.io/fyne/v2/canvas.*Line": "Go(*canvas.Line)", + "fyne.io/fyne/v2/canvas.*LinearGradient": "Go(*canvas.LinearGradient)", + "fyne.io/fyne/v2/canvas.*RadialGradient": "Go(*canvas.RadialGradient)", + "fyne.io/fyne/v2/canvas.*Raster": "Go(*canvas.Raster)", + "fyne.io/fyne/v2/canvas.*Rectangle": "Go(*canvas.Rectangle)", + "fyne.io/fyne/v2/canvas.*Text": "Go(*canvas.Text)", + "fyne.io/fyne/v2/container.*AppTabs": "Go(*container.AppTabs)", + "fyne.io/fyne/v2/container.*DocTabs": "Go(*container.DocTabs)", + "fyne.io/fyne/v2/container.*InnerWindow": "Go(*container.InnerWindow)", + "fyne.io/fyne/v2/container.*MultipleWindows": "Go(*container.MultipleWindows)", + "fyne.io/fyne/v2/container.*Split": "Go(*container.Split)", + "fyne.io/fyne/v2/container.*TabItem": "Go(*container.TabItem)", + "fyne.io/fyne/v2/container.*ThemeOverride": "Go(*container.ThemeOverride)", + "fyne.io/fyne/v2/dialog.*ColorPickerDialog": "Go(*dialog.ColorPickerDialog)", + "fyne.io/fyne/v2/dialog.*ConfirmDialog": "Go(*dialog.ConfirmDialog)", + "fyne.io/fyne/v2/dialog.*CustomDialog": "Go(*dialog.CustomDialog)", + "fyne.io/fyne/v2/dialog.*EntryDialog": "Go(*dialog.EntryDialog)", + "fyne.io/fyne/v2/dialog.*FileDialog": "Go(*dialog.FileDialog)", + "fyne.io/fyne/v2/dialog.*FormDialog": "Go(*dialog.FormDialog)", + "fyne.io/fyne/v2/dialog.*ProgressDialog": "Go(*dialog.ProgressDialog)", + "fyne.io/fyne/v2/dialog.*ProgressInfiniteDialog": "Go(*dialog.ProgressInfiniteDialog)", + "fyne.io/fyne/v2/driver.*AndroidContext": "Go(*fyne_driver.AndroidContext)", + "fyne.io/fyne/v2/driver.*AndroidWindowContext": "Go(*fyne_driver.AndroidWindowContext)", + "fyne.io/fyne/v2/driver.*MacWindowContext": "Go(*fyne_driver.MacWindowContext)", + "fyne.io/fyne/v2/driver.*UnknownContext": "Go(*fyne_driver.UnknownContext)", + "fyne.io/fyne/v2/driver.*WaylandWindowContext": "Go(*fyne_driver.WaylandWindowContext)", + "fyne.io/fyne/v2/driver.*WindowsWindowContext": "Go(*fyne_driver.WindowsWindowContext)", + "fyne.io/fyne/v2/driver.*X11WindowContext": "Go(*fyne_driver.X11WindowContext)", + "fyne.io/fyne/v2/driver/desktop.*CustomShortcut": "Go(*desktop.CustomShortcut)", + "fyne.io/fyne/v2/driver/desktop.*MouseEvent": "Go(*desktop.MouseEvent)", + "fyne.io/fyne/v2/driver/mobile.*TouchEvent": "Go(*mobile.TouchEvent)", + "fyne.io/fyne/v2/layout.*CustomPaddedLayout": "Go(*layout.CustomPaddedLayout)", + "fyne.io/fyne/v2/layout.*Spacer": "Go(*layout.Spacer)", + "fyne.io/fyne/v2/storage.*ExtensionFileFilter": "Go(*storage.ExtensionFileFilter)", + "fyne.io/fyne/v2/storage.*MimeTypeFileFilter": "Go(*storage.MimeTypeFileFilter)", + "fyne.io/fyne/v2/theme.*DisabledResource": "Go(*theme.DisabledResource)", + "fyne.io/fyne/v2/theme.*ErrorThemedResource": "Go(*theme.ErrorThemedResource)", + "fyne.io/fyne/v2/theme.*InvertedThemedResource": "Go(*theme.InvertedThemedResource)", + "fyne.io/fyne/v2/theme.*PrimaryThemedResource": "Go(*theme.PrimaryThemedResource)", + "fyne.io/fyne/v2/theme.*ThemedResource": "Go(*theme.ThemedResource)", + "fyne.io/fyne/v2/widget.*Accordion": "Go(*widget.Accordion)", + "fyne.io/fyne/v2/widget.*AccordionItem": "Go(*widget.AccordionItem)", + "fyne.io/fyne/v2/widget.*Activity": "Go(*widget.Activity)", + "fyne.io/fyne/v2/widget.*BaseWidget": "Go(*widget.BaseWidget)", + "fyne.io/fyne/v2/widget.*Button": "Go(*widget.Button)", + "fyne.io/fyne/v2/widget.*Card": "Go(*widget.Card)", + "fyne.io/fyne/v2/widget.*Check": "Go(*widget.Check)", + "fyne.io/fyne/v2/widget.*CheckGroup": "Go(*widget.CheckGroup)", + "fyne.io/fyne/v2/widget.*CustomTextGridStyle": "Go(*widget.CustomTextGridStyle)", + "fyne.io/fyne/v2/widget.*DisableableWidget": "Go(*widget.DisableableWidget)", + "fyne.io/fyne/v2/widget.*Entry": "Go(*widget.Entry)", + "fyne.io/fyne/v2/widget.*FileIcon": "Go(*widget.FileIcon)", + "fyne.io/fyne/v2/widget.*Form": "Go(*widget.Form)", + "fyne.io/fyne/v2/widget.*FormItem": "Go(*widget.FormItem)", + "fyne.io/fyne/v2/widget.*GridWrap": "Go(*widget.GridWrap)", + "fyne.io/fyne/v2/widget.*Hyperlink": "Go(*widget.Hyperlink)", + "fyne.io/fyne/v2/widget.*HyperlinkSegment": "Go(*widget.HyperlinkSegment)", + "fyne.io/fyne/v2/widget.*Icon": "Go(*widget.Icon)", + "fyne.io/fyne/v2/widget.*ImageSegment": "Go(*widget.ImageSegment)", + "fyne.io/fyne/v2/widget.*Label": "Go(*widget.Label)", + "fyne.io/fyne/v2/widget.*List": "Go(*widget.List)", + "fyne.io/fyne/v2/widget.*ListSegment": "Go(*widget.ListSegment)", + "fyne.io/fyne/v2/widget.*Menu": "Go(*widget.Menu)", + "fyne.io/fyne/v2/widget.*ParagraphSegment": "Go(*widget.ParagraphSegment)", + "fyne.io/fyne/v2/widget.*PopUp": "Go(*widget.PopUp)", + "fyne.io/fyne/v2/widget.*PopUpMenu": "Go(*widget.PopUpMenu)", + "fyne.io/fyne/v2/widget.*ProgressBar": "Go(*widget.ProgressBar)", + "fyne.io/fyne/v2/widget.*ProgressBarInfinite": "Go(*widget.ProgressBarInfinite)", + "fyne.io/fyne/v2/widget.*RadioGroup": "Go(*widget.RadioGroup)", + "fyne.io/fyne/v2/widget.*RichText": "Go(*widget.RichText)", + "fyne.io/fyne/v2/widget.*RichTextStyle": "Go(*widget.RichTextStyle)", + "fyne.io/fyne/v2/widget.*Select": "Go(*widget.Select)", + "fyne.io/fyne/v2/widget.*SelectEntry": "Go(*widget.SelectEntry)", + "fyne.io/fyne/v2/widget.*Separator": "Go(*widget.Separator)", + "fyne.io/fyne/v2/widget.*SeparatorSegment": "Go(*widget.SeparatorSegment)", + "fyne.io/fyne/v2/widget.*Slider": "Go(*widget.Slider)", + "fyne.io/fyne/v2/widget.*Table": "Go(*widget.Table)", + "fyne.io/fyne/v2/widget.*TableCellID": "Go(*widget.TableCellID)", + "fyne.io/fyne/v2/widget.*TextGrid": "Go(*widget.TextGrid)", + "fyne.io/fyne/v2/widget.*TextGridCell": "Go(*widget.TextGridCell)", + "fyne.io/fyne/v2/widget.*TextGridRow": "Go(*widget.TextGridRow)", + "fyne.io/fyne/v2/widget.*TextSegment": "Go(*widget.TextSegment)", + "fyne.io/fyne/v2/widget.*Toolbar": "Go(*widget.Toolbar)", + "fyne.io/fyne/v2/widget.*ToolbarAction": "Go(*widget.ToolbarAction)", + "fyne.io/fyne/v2/widget.*ToolbarSeparator": "Go(*widget.ToolbarSeparator)", + "fyne.io/fyne/v2/widget.*ToolbarSpacer": "Go(*widget.ToolbarSpacer)", + "fyne.io/fyne/v2/widget.*Tree": "Go(*widget.Tree)", + "io.*LimitedReader": "Go(*io.LimitedReader)", + "io.*PipeReader": "Go(*io.PipeReader)", + "io.*PipeWriter": "Go(*io.PipeWriter)", + "io.*SectionReader": "Go(*io.SectionReader)", + "sync.*Cond": "Go(*sync.Cond)", + "sync.*Map": "Go(*sync.Map)", + "sync.*Mutex": "Go(*sync.Mutex)", + "sync.*Once": "Go(*sync.Once)", + "sync.*Pool": "Go(*sync.Pool)", + "sync.*RWMutex": "Go(*sync.RWMutex)", + "sync.*WaitGroup": "Go(*sync.WaitGroup)", +} + +type iface_binding_Bool struct { + self env.RyeCtx + fn_Get func(self env.RyeCtx) (bool, error) + fn_Set func(self env.RyeCtx, arg0 bool) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_Bool) Get() (bool, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_Bool) Set(arg0 bool) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_Bool) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_Bool) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_Bool(ps *env.ProgramState, v env.RyeCtx) (binding.Bool, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_Bool{ + self: v, + } + ctxObj0, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.Bool: expected context to have function Get") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.Bool: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (bool, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bool: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bool: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bool: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bool: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bool: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.Bool: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.Bool: expected context to have function Set") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Bool: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 bool) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bool: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bool: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.Bool: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.Bool: expected context to have function AddListener") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Bool: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.Bool: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.Bool: expected context to have function RemoveListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Bool: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.Bool: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_BoolList struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 bool) error + fn_Get func(self env.RyeCtx) ([]bool, error) + fn_GetValue func(self env.RyeCtx, arg0 int) (bool, error) + fn_Prepend func(self env.RyeCtx, arg0 bool) error + fn_Remove func(self env.RyeCtx, arg0 bool) error + fn_Set func(self env.RyeCtx, arg0 []bool) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 bool) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_BoolList) Append(arg0 bool) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_BoolList) Get() ([]bool, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_BoolList) GetValue(arg0 int) (bool, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_BoolList) Prepend(arg0 bool) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_BoolList) Remove(arg0 bool) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_BoolList) Set(arg0 []bool) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_BoolList) SetValue(arg0 int, arg1 bool) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_BoolList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_BoolList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_BoolList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_BoolList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_BoolList(ps *env.ProgramState, v env.RyeCtx) (binding.BoolList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_BoolList{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.BoolList: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BoolList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 bool) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BoolList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.BoolList: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.BoolList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]bool, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]bool, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.BoolList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.BoolList: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BoolList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) (bool, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.BoolList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.BoolList: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BoolList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 bool) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BoolList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.BoolList: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BoolList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 bool) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BoolList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.BoolList: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BoolList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []bool) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewInteger(boolToInt64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BoolList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.BoolList: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.BoolList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 bool) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = *env.NewInteger(boolToInt64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BoolList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.BoolList: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BoolList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.BoolList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.BoolList: expected context to have function Length") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.BoolList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BoolList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.BoolList: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BoolList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.BoolList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.BoolList: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BoolList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.BoolList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_BoolTree struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 bool) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string]bool, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (bool, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 bool) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string]bool) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 bool) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_BoolTree) Append(arg0 string, arg1 string, arg2 bool) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_BoolTree) Get() (map[string][]string, map[string]bool, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_BoolTree) GetValue(arg0 string) (bool, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_BoolTree) Prepend(arg0 string, arg1 string, arg2 bool) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_BoolTree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_BoolTree) Set(arg0 map[string][]string, arg1 map[string]bool) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_BoolTree) SetValue(arg0 string, arg1 bool) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_BoolTree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_BoolTree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_BoolTree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_BoolTree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_BoolTree(ps *env.ProgramState, v env.RyeCtx) (binding.BoolTree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_BoolTree{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.BoolTree: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.BoolTree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 bool) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewInteger(boolToInt64(farg2)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BoolTree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.BoolTree: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.BoolTree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string]bool, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string]bool + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string]bool, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV bool + if vc, ok := v.Series.S[i+1].(env.Integer); ok { + mapV = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"map value: "+"expected integer, but got "+objectDebugString(ps.Idx, v.Series.S[i+1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string]bool, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV bool + if vc, ok := dictV.(env.Integer); ok { + mapV = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"map value: "+"expected integer, but got "+objectDebugString(ps.Idx, dictV), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.BoolTree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.BoolTree: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BoolTree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (bool, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.BoolTree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.BoolTree: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.BoolTree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 bool) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewInteger(boolToInt64(farg2)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BoolTree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.BoolTree: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BoolTree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BoolTree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.BoolTree: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.BoolTree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string]bool) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + dVal = *env.NewInteger(boolToInt64(mVal)) + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BoolTree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.BoolTree: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.BoolTree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 bool) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewInteger(boolToInt64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BoolTree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.BoolTree: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BoolTree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.BoolTree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.BoolTree: expected context to have function ChildIDs") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BoolTree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BoolTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BoolTree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.BoolTree: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BoolTree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.BoolTree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.BoolTree: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BoolTree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.BoolTree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_Bytes struct { + self env.RyeCtx + fn_Get func(self env.RyeCtx) ([]byte, error) + fn_Set func(self env.RyeCtx, arg0 []byte) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_Bytes) Get() ([]byte, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_Bytes) Set(arg0 []byte) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_Bytes) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_Bytes) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_Bytes(ps *env.ProgramState, v env.RyeCtx) (binding.Bytes, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_Bytes{ + self: v, + } + ctxObj0, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.Bytes: expected context to have function Get") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.Bytes: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]byte, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []byte + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bytes: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bytes: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bytes: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bytes: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bytes: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bytes: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bytes: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.Bytes: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.Bytes: expected context to have function Set") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Bytes: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []byte) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewInteger(int64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bytes: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Bytes: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.Bytes: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.Bytes: expected context to have function AddListener") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Bytes: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.Bytes: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.Bytes: expected context to have function RemoveListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Bytes: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.Bytes: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_BytesList struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 []byte) error + fn_Get func(self env.RyeCtx) ([][]byte, error) + fn_GetValue func(self env.RyeCtx, arg0 int) ([]byte, error) + fn_Prepend func(self env.RyeCtx, arg0 []byte) error + fn_Remove func(self env.RyeCtx, arg0 []byte) error + fn_Set func(self env.RyeCtx, arg0 [][]byte) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 []byte) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_BytesList) Append(arg0 []byte) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_BytesList) Get() ([][]byte, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_BytesList) GetValue(arg0 int) ([]byte, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_BytesList) Prepend(arg0 []byte) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_BytesList) Remove(arg0 []byte) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_BytesList) Set(arg0 [][]byte) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_BytesList) SetValue(arg0 int, arg1 []byte) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_BytesList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_BytesList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_BytesList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_BytesList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_BytesList(ps *env.ProgramState, v env.RyeCtx) (binding.BytesList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_BytesList{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.BytesList: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BytesList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 []byte) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewInteger(int64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BytesList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.BytesList: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.BytesList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([][]byte, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 [][]byte + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([][]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + switch v := it.(type) { + case env.Block: + (*iv) = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &(*iv)[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"block item: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"block item: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + (*iv) = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"block item: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.BytesList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.BytesList: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BytesList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) ([]byte, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 []byte + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.BytesList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.BytesList: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BytesList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 []byte) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewInteger(int64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BytesList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.BytesList: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BytesList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 []byte) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewInteger(int64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BytesList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.BytesList: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BytesList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 [][]byte) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + { + items := make([]env.Object, len(it)) + for i, it := range it { + items[i] = *env.NewInteger(int64(it)) + } + items[i] = *env.NewBlock(*env.NewTSeries(items)) + } + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BytesList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.BytesList: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.BytesList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 []byte) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + { + items := make([]env.Object, len(farg1)) + for i, it := range farg1 { + items[i] = *env.NewInteger(int64(it)) + } + farg1Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BytesList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.BytesList: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BytesList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.BytesList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.BytesList: expected context to have function Length") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.BytesList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BytesList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.BytesList: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BytesList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.BytesList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.BytesList: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BytesList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.BytesList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_BytesTree struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 []byte) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string][]byte, error) + fn_GetValue func(self env.RyeCtx, arg0 string) ([]byte, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 []byte) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string][]byte) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 []byte) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_BytesTree) Append(arg0 string, arg1 string, arg2 []byte) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_BytesTree) Get() (map[string][]string, map[string][]byte, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_BytesTree) GetValue(arg0 string) ([]byte, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_BytesTree) Prepend(arg0 string, arg1 string, arg2 []byte) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_BytesTree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_BytesTree) Set(arg0 map[string][]string, arg1 map[string][]byte) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_BytesTree) SetValue(arg0 string, arg1 []byte) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_BytesTree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_BytesTree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_BytesTree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_BytesTree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_BytesTree(ps *env.ProgramState, v env.RyeCtx) (binding.BytesTree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_BytesTree{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.BytesTree: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.BytesTree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 []byte) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + { + items := make([]env.Object, len(farg2)) + for i, it := range farg2 { + items[i] = *env.NewInteger(int64(it)) + } + farg2Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BytesTree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.BytesTree: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.BytesTree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string][]byte, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string][]byte + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string][]byte, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []byte + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"map value: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string][]byte, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []byte + switch v := dictV.(type) { + case env.Block: + mapV = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"map value: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.BytesTree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.BytesTree: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BytesTree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) ([]byte, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 []byte + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.BytesTree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.BytesTree: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.BytesTree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 []byte) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + { + items := make([]env.Object, len(farg2)) + for i, it := range farg2 { + items[i] = *env.NewInteger(int64(it)) + } + farg2Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BytesTree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.BytesTree: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BytesTree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BytesTree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.BytesTree: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.BytesTree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string][]byte) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewInteger(int64(it)) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BytesTree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.BytesTree: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.BytesTree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 []byte) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + { + items := make([]env.Object, len(farg1)) + for i, it := range farg1 { + items[i] = *env.NewInteger(int64(it)) + } + farg1Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BytesTree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.BytesTree: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BytesTree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.BytesTree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.BytesTree: expected context to have function ChildIDs") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BytesTree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.BytesTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.BytesTree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.BytesTree: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BytesTree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.BytesTree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.BytesTree: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.BytesTree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.BytesTree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_DataItem struct { + self env.RyeCtx + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_DataItem) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_DataItem) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_DataItem(ps *env.ProgramState, v env.RyeCtx) (binding.DataItem, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_DataItem{ + self: v, + } + ctxObj0, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.DataItem: expected context to have function AddListener") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.DataItem: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.DataItem: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.DataItem: expected context to have function RemoveListener") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.DataItem: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.DataItem: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_DataList struct { + self env.RyeCtx + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_DataList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_DataList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_DataList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_DataList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_DataList(ps *env.ProgramState, v env.RyeCtx) (binding.DataList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_DataList{ + self: v, + } + ctxObj0, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.DataList: expected context to have function GetItem") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.DataList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.DataList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.DataList: expected context to have function Length") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.DataList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.DataList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.DataList: expected context to have function AddListener") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.DataList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.DataList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.DataList: expected context to have function RemoveListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.DataList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.DataList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_DataListener struct { + self env.RyeCtx + fn_DataChanged func(self env.RyeCtx) +} + +func (self *iface_binding_DataListener) DataChanged() { + self.fn_DataChanged(self.self) +} + +func ctxTo_binding_DataListener(ps *env.ProgramState, v env.RyeCtx) (binding.DataListener, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_DataListener{ + self: v, + } + ctxObj0, ok := wordToObj["data-changed"] + if !ok { + return nil, errors.New("context to binding.DataListener: expected context to have function DataChanged") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.DataListener: context fn DataChanged: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_DataChanged = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to binding.DataListener: context fn DataChanged: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_DataMap struct { + self env.RyeCtx + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_Keys func(self env.RyeCtx) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_DataMap) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_DataMap) Keys() []string { + return self.fn_Keys(self.self) +} + +func (self *iface_binding_DataMap) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_DataMap) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_DataMap(ps *env.ProgramState, v env.RyeCtx) (binding.DataMap, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_DataMap{ + self: v, + } + ctxObj0, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.DataMap: expected context to have function GetItem") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.DataMap: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataMap: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataMap: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataMap: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataMap: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataMap: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataMap: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.DataMap: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["keys"] + if !ok { + return nil, errors.New("context to binding.DataMap: expected context to have function Keys") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.DataMap: context fn Keys: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Keys = func(ctx env.RyeCtx) []string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataMap: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataMap: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.DataMap: context fn Keys: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.DataMap: expected context to have function AddListener") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.DataMap: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.DataMap: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.DataMap: expected context to have function RemoveListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.DataMap: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.DataMap: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_DataTree struct { + self env.RyeCtx + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_DataTree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_DataTree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_DataTree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_DataTree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_DataTree(ps *env.ProgramState, v env.RyeCtx) (binding.DataTree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_DataTree{ + self: v, + } + ctxObj0, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.DataTree: expected context to have function GetItem") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.DataTree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataTree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataTree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.DataTree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.DataTree: expected context to have function ChildIDs") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.DataTree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataTree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.DataTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.DataTree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.DataTree: expected context to have function AddListener") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.DataTree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.DataTree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.DataTree: expected context to have function RemoveListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.DataTree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.DataTree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalBool struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Get func(self env.RyeCtx) (bool, error) + fn_Set func(self env.RyeCtx, arg0 bool) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalBool) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalBool) Get() (bool, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalBool) Set(arg0 bool) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalBool) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalBool) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalBool(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalBool, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalBool{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalBool: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalBool: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBool: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBool: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBool: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalBool: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalBool: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (bool, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBool: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBool: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBool: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBool: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBool: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalBool: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalBool: expected context to have function Set") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBool: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 bool) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBool: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBool: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBool: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalBool: expected context to have function AddListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBool: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalBool: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalBool: expected context to have function RemoveListener") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBool: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalBool: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalBoolList struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 bool) error + fn_Get func(self env.RyeCtx) ([]bool, error) + fn_GetValue func(self env.RyeCtx, arg0 int) (bool, error) + fn_Prepend func(self env.RyeCtx, arg0 bool) error + fn_Remove func(self env.RyeCtx, arg0 bool) error + fn_Set func(self env.RyeCtx, arg0 []bool) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 bool) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalBoolList) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalBoolList) Append(arg0 bool) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_ExternalBoolList) Get() ([]bool, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalBoolList) GetValue(arg0 int) (bool, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalBoolList) Prepend(arg0 bool) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_ExternalBoolList) Remove(arg0 bool) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalBoolList) Set(arg0 []bool) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalBoolList) SetValue(arg0 int, arg1 bool) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalBoolList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalBoolList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_ExternalBoolList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalBoolList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalBoolList(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalBoolList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalBoolList{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolList: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalBoolList: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBoolList: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolList: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBoolList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 bool) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBoolList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolList: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalBoolList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]bool, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]bool, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalBoolList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolList: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBoolList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) (bool, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalBoolList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolList: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBoolList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 bool) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBoolList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolList: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBoolList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 bool) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBoolList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolList: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBoolList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []bool) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewInteger(boolToInt64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBoolList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolList: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalBoolList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 bool) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = *env.NewInteger(boolToInt64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBoolList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolList: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBoolList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalBoolList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolList: expected context to have function Length") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalBoolList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBoolList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolList: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBoolList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalBoolList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolList: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBoolList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalBoolList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalBoolTree struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 bool) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string]bool, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (bool, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 bool) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string]bool) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 bool) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalBoolTree) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalBoolTree) Append(arg0 string, arg1 string, arg2 bool) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalBoolTree) Get() (map[string][]string, map[string]bool, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalBoolTree) GetValue(arg0 string) (bool, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalBoolTree) Prepend(arg0 string, arg1 string, arg2 bool) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalBoolTree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalBoolTree) Set(arg0 map[string][]string, arg1 map[string]bool) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalBoolTree) SetValue(arg0 string, arg1 bool) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalBoolTree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalBoolTree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_ExternalBoolTree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalBoolTree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalBoolTree(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalBoolTree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalBoolTree{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolTree: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalBoolTree: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBoolTree: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolTree: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalBoolTree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 bool) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewInteger(boolToInt64(farg2)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBoolTree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolTree: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalBoolTree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string]bool, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string]bool + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string]bool, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV bool + if vc, ok := v.Series.S[i+1].(env.Integer); ok { + mapV = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"map value: "+"expected integer, but got "+objectDebugString(ps.Idx, v.Series.S[i+1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string]bool, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV bool + if vc, ok := dictV.(env.Integer); ok { + mapV = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"map value: "+"expected integer, but got "+objectDebugString(ps.Idx, dictV), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.ExternalBoolTree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolTree: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBoolTree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (bool, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalBoolTree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolTree: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalBoolTree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 bool) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewInteger(boolToInt64(farg2)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBoolTree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolTree: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBoolTree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBoolTree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolTree: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalBoolTree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string]bool) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + dVal = *env.NewInteger(boolToInt64(mVal)) + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBoolTree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolTree: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalBoolTree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 bool) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewInteger(boolToInt64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBoolTree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolTree: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBoolTree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalBoolTree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolTree: expected context to have function ChildIDs") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBoolTree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBoolTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBoolTree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolTree: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBoolTree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalBoolTree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalBoolTree: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBoolTree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalBoolTree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalBytes struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Get func(self env.RyeCtx) ([]byte, error) + fn_Set func(self env.RyeCtx, arg0 []byte) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalBytes) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalBytes) Get() ([]byte, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalBytes) Set(arg0 []byte) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalBytes) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalBytes) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalBytes(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalBytes, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalBytes{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalBytes: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalBytes: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytes: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytes: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytes: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalBytes: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalBytes: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]byte, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []byte + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytes: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytes: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytes: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytes: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytes: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytes: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytes: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalBytes: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalBytes: expected context to have function Set") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytes: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []byte) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewInteger(int64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytes: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytes: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytes: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalBytes: expected context to have function AddListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytes: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalBytes: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalBytes: expected context to have function RemoveListener") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytes: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalBytes: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalBytesList struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 []byte) error + fn_Get func(self env.RyeCtx) ([][]byte, error) + fn_GetValue func(self env.RyeCtx, arg0 int) ([]byte, error) + fn_Prepend func(self env.RyeCtx, arg0 []byte) error + fn_Remove func(self env.RyeCtx, arg0 []byte) error + fn_Set func(self env.RyeCtx, arg0 [][]byte) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 []byte) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalBytesList) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalBytesList) Append(arg0 []byte) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_ExternalBytesList) Get() ([][]byte, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalBytesList) GetValue(arg0 int) ([]byte, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalBytesList) Prepend(arg0 []byte) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_ExternalBytesList) Remove(arg0 []byte) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalBytesList) Set(arg0 [][]byte) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalBytesList) SetValue(arg0 int, arg1 []byte) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalBytesList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalBytesList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_ExternalBytesList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalBytesList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalBytesList(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalBytesList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalBytesList{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesList: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalBytesList: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytesList: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesList: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytesList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 []byte) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewInteger(int64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytesList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesList: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalBytesList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([][]byte, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 [][]byte + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([][]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + switch v := it.(type) { + case env.Block: + (*iv) = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &(*iv)[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"block item: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"block item: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + (*iv) = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"block item: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalBytesList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesList: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytesList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) ([]byte, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 []byte + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalBytesList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesList: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytesList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 []byte) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewInteger(int64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytesList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesList: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytesList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 []byte) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewInteger(int64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytesList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesList: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytesList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 [][]byte) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + { + items := make([]env.Object, len(it)) + for i, it := range it { + items[i] = *env.NewInteger(int64(it)) + } + items[i] = *env.NewBlock(*env.NewTSeries(items)) + } + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytesList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesList: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalBytesList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 []byte) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + { + items := make([]env.Object, len(farg1)) + for i, it := range farg1 { + items[i] = *env.NewInteger(int64(it)) + } + farg1Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytesList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesList: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytesList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalBytesList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesList: expected context to have function Length") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalBytesList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytesList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesList: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytesList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalBytesList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesList: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytesList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalBytesList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalBytesTree struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 []byte) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string][]byte, error) + fn_GetValue func(self env.RyeCtx, arg0 string) ([]byte, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 []byte) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string][]byte) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 []byte) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalBytesTree) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalBytesTree) Append(arg0 string, arg1 string, arg2 []byte) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalBytesTree) Get() (map[string][]string, map[string][]byte, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalBytesTree) GetValue(arg0 string) ([]byte, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalBytesTree) Prepend(arg0 string, arg1 string, arg2 []byte) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalBytesTree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalBytesTree) Set(arg0 map[string][]string, arg1 map[string][]byte) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalBytesTree) SetValue(arg0 string, arg1 []byte) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalBytesTree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalBytesTree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_ExternalBytesTree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalBytesTree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalBytesTree(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalBytesTree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalBytesTree{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesTree: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalBytesTree: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytesTree: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesTree: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalBytesTree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 []byte) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + { + items := make([]env.Object, len(farg2)) + for i, it := range farg2 { + items[i] = *env.NewInteger(int64(it)) + } + farg2Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytesTree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesTree: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalBytesTree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string][]byte, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string][]byte + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string][]byte, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []byte + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"map value: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string][]byte, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []byte + switch v := dictV.(type) { + case env.Block: + mapV = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"map value: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.ExternalBytesTree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesTree: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytesTree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) ([]byte, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 []byte + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalBytesTree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesTree: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalBytesTree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 []byte) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + { + items := make([]env.Object, len(farg2)) + for i, it := range farg2 { + items[i] = *env.NewInteger(int64(it)) + } + farg2Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytesTree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesTree: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytesTree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytesTree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesTree: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalBytesTree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string][]byte) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewInteger(int64(it)) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytesTree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesTree: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalBytesTree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 []byte) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + { + items := make([]env.Object, len(farg1)) + for i, it := range farg1 { + items[i] = *env.NewInteger(int64(it)) + } + farg1Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytesTree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesTree: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytesTree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalBytesTree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesTree: expected context to have function ChildIDs") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytesTree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalBytesTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalBytesTree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesTree: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytesTree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalBytesTree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalBytesTree: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalBytesTree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalBytesTree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalFloat struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Get func(self env.RyeCtx) (float64, error) + fn_Set func(self env.RyeCtx, arg0 float64) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalFloat) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalFloat) Get() (float64, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalFloat) Set(arg0 float64) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalFloat) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalFloat) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalFloat(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalFloat, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalFloat{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalFloat: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalFloat: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloat: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloat: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloat: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalFloat: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalFloat: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (float64, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 float64 + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloat: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloat: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Decimal); ok { + res0 = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloat: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloat: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloat: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalFloat: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalFloat: expected context to have function Set") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloat: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 float64) error { + var farg0Val env.Object + farg0Val = *env.NewDecimal(float64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloat: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloat: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloat: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalFloat: expected context to have function AddListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloat: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalFloat: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalFloat: expected context to have function RemoveListener") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloat: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalFloat: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalFloatList struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 float64) error + fn_Get func(self env.RyeCtx) ([]float64, error) + fn_GetValue func(self env.RyeCtx, arg0 int) (float64, error) + fn_Prepend func(self env.RyeCtx, arg0 float64) error + fn_Remove func(self env.RyeCtx, arg0 float64) error + fn_Set func(self env.RyeCtx, arg0 []float64) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 float64) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalFloatList) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalFloatList) Append(arg0 float64) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_ExternalFloatList) Get() ([]float64, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalFloatList) GetValue(arg0 int) (float64, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalFloatList) Prepend(arg0 float64) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_ExternalFloatList) Remove(arg0 float64) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalFloatList) Set(arg0 []float64) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalFloatList) SetValue(arg0 int, arg1 float64) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalFloatList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalFloatList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_ExternalFloatList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalFloatList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalFloatList(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalFloatList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalFloatList{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatList: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalFloatList: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloatList: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatList: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloatList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 float64) error { + var farg0Val env.Object + farg0Val = *env.NewDecimal(float64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloatList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatList: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalFloatList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]float64, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []float64 + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]float64, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + if vc, ok := it.(env.Decimal); ok { + (*iv) = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"block item: "+"expected decimal, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalFloatList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatList: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloatList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) (float64, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 float64 + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Decimal); ok { + res0 = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalFloatList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatList: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloatList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 float64) error { + var farg0Val env.Object + farg0Val = *env.NewDecimal(float64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloatList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatList: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloatList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 float64) error { + var farg0Val env.Object + farg0Val = *env.NewDecimal(float64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloatList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatList: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloatList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []float64) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewDecimal(float64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloatList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatList: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalFloatList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 float64) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = *env.NewDecimal(float64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloatList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatList: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloatList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalFloatList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatList: expected context to have function Length") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalFloatList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloatList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatList: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloatList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalFloatList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatList: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloatList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalFloatList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalFloatTree struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 float64) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string]float64, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (float64, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 float64) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string]float64) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 float64) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalFloatTree) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalFloatTree) Append(arg0 string, arg1 string, arg2 float64) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalFloatTree) Get() (map[string][]string, map[string]float64, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalFloatTree) GetValue(arg0 string) (float64, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalFloatTree) Prepend(arg0 string, arg1 string, arg2 float64) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalFloatTree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalFloatTree) Set(arg0 map[string][]string, arg1 map[string]float64) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalFloatTree) SetValue(arg0 string, arg1 float64) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalFloatTree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalFloatTree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_ExternalFloatTree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalFloatTree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalFloatTree(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalFloatTree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalFloatTree{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatTree: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalFloatTree: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloatTree: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatTree: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalFloatTree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 float64) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewDecimal(float64(farg2)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloatTree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatTree: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalFloatTree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string]float64, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string]float64 + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string]float64, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV float64 + if vc, ok := v.Series.S[i+1].(env.Decimal); ok { + mapV = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"map value: "+"expected decimal, but got "+objectDebugString(ps.Idx, v.Series.S[i+1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string]float64, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV float64 + if vc, ok := dictV.(env.Decimal); ok { + mapV = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"map value: "+"expected decimal, but got "+objectDebugString(ps.Idx, dictV), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.ExternalFloatTree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatTree: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloatTree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (float64, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 float64 + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Decimal); ok { + res0 = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalFloatTree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatTree: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalFloatTree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 float64) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewDecimal(float64(farg2)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloatTree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatTree: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloatTree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloatTree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatTree: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalFloatTree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string]float64) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + dVal = *env.NewDecimal(float64(mVal)) + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloatTree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatTree: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalFloatTree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 float64) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewDecimal(float64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloatTree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatTree: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloatTree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalFloatTree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatTree: expected context to have function ChildIDs") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloatTree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalFloatTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalFloatTree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatTree: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloatTree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalFloatTree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalFloatTree: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalFloatTree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalFloatTree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalInt struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Get func(self env.RyeCtx) (int, error) + fn_Set func(self env.RyeCtx, arg0 int) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalInt) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalInt) Get() (int, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalInt) Set(arg0 int) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalInt) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalInt) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalInt(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalInt, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalInt{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalInt: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalInt: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalInt: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalInt: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalInt: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalInt: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalInt: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (int, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 int + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalInt: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalInt: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalInt: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalInt: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalInt: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalInt: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalInt: expected context to have function Set") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalInt: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 int) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalInt: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalInt: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalInt: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalInt: expected context to have function AddListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalInt: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalInt: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalInt: expected context to have function RemoveListener") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalInt: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalInt: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalIntList struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 int) error + fn_Get func(self env.RyeCtx) ([]int, error) + fn_GetValue func(self env.RyeCtx, arg0 int) (int, error) + fn_Prepend func(self env.RyeCtx, arg0 int) error + fn_Remove func(self env.RyeCtx, arg0 int) error + fn_Set func(self env.RyeCtx, arg0 []int) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 int) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalIntList) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalIntList) Append(arg0 int) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_ExternalIntList) Get() ([]int, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalIntList) GetValue(arg0 int) (int, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalIntList) Prepend(arg0 int) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_ExternalIntList) Remove(arg0 int) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalIntList) Set(arg0 []int) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalIntList) SetValue(arg0 int, arg1 int) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalIntList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalIntList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_ExternalIntList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalIntList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalIntList(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalIntList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalIntList{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalIntList: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalIntList: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalIntList: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalIntList: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalIntList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 int) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalIntList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalIntList: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalIntList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]int, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []int + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]int, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalIntList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalIntList: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalIntList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) (int, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 int + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalIntList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalIntList: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalIntList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 int) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalIntList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalIntList: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalIntList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 int) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalIntList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalIntList: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalIntList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []int) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewInteger(int64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalIntList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalIntList: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalIntList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 int) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = *env.NewInteger(int64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalIntList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalIntList: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalIntList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalIntList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.ExternalIntList: expected context to have function Length") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalIntList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalIntList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalIntList: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalIntList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalIntList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalIntList: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalIntList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalIntList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalIntTree struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 int) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string]int, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (int, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 int) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string]int) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 int) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalIntTree) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalIntTree) Append(arg0 string, arg1 string, arg2 int) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalIntTree) Get() (map[string][]string, map[string]int, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalIntTree) GetValue(arg0 string) (int, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalIntTree) Prepend(arg0 string, arg1 string, arg2 int) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalIntTree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalIntTree) Set(arg0 map[string][]string, arg1 map[string]int) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalIntTree) SetValue(arg0 string, arg1 int) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalIntTree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalIntTree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_ExternalIntTree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalIntTree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalIntTree(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalIntTree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalIntTree{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalIntTree: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalIntTree: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalIntTree: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalIntTree: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalIntTree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 int) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewInteger(int64(farg2)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalIntTree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalIntTree: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalIntTree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string]int, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string]int + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string]int, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV int + if vc, ok := v.Series.S[i+1].(env.Integer); ok { + mapV = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"map value: "+"expected integer, but got "+objectDebugString(ps.Idx, v.Series.S[i+1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string]int, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV int + if vc, ok := dictV.(env.Integer); ok { + mapV = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"map value: "+"expected integer, but got "+objectDebugString(ps.Idx, dictV), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.ExternalIntTree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalIntTree: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalIntTree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (int, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 int + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalIntTree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalIntTree: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalIntTree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 int) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewInteger(int64(farg2)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalIntTree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalIntTree: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalIntTree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalIntTree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalIntTree: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalIntTree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string]int) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + dVal = *env.NewInteger(int64(mVal)) + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalIntTree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalIntTree: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalIntTree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 int) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewInteger(int64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalIntTree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalIntTree: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalIntTree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalIntTree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.ExternalIntTree: expected context to have function ChildIDs") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalIntTree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalIntTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalIntTree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalIntTree: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalIntTree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalIntTree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalIntTree: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalIntTree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalIntTree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalRune struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Get func(self env.RyeCtx) (rune, error) + fn_Set func(self env.RyeCtx, arg0 rune) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalRune) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalRune) Get() (rune, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalRune) Set(arg0 rune) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalRune) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalRune) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalRune(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalRune, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalRune{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalRune: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalRune: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRune: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRune: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRune: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalRune: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalRune: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (rune, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 rune + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRune: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRune: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRune: arg 0: callback result: "+"expected native of type rune, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRune: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRune: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRune: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalRune: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalRune: expected context to have function Set") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRune: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 rune) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRune: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRune: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRune: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalRune: expected context to have function AddListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRune: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalRune: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalRune: expected context to have function RemoveListener") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRune: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalRune: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalRuneList struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 rune) error + fn_Get func(self env.RyeCtx) ([]rune, error) + fn_GetValue func(self env.RyeCtx, arg0 int) (rune, error) + fn_Prepend func(self env.RyeCtx, arg0 rune) error + fn_Remove func(self env.RyeCtx, arg0 rune) error + fn_Set func(self env.RyeCtx, arg0 []rune) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 rune) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalRuneList) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalRuneList) Append(arg0 rune) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_ExternalRuneList) Get() ([]rune, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalRuneList) GetValue(arg0 int) (rune, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalRuneList) Prepend(arg0 rune) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_ExternalRuneList) Remove(arg0 rune) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalRuneList) Set(arg0 []rune) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalRuneList) SetValue(arg0 int, arg1 rune) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalRuneList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalRuneList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_ExternalRuneList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalRuneList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalRuneList(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalRuneList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalRuneList{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneList: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalRuneList: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRuneList: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneList: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRuneList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 rune) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRuneList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneList: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalRuneList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]rune, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []rune + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]rune, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"block item: "+"expected native of type rune, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"block item: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalRuneList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneList: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRuneList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) (rune, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 rune + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected native of type rune, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalRuneList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneList: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRuneList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 rune) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRuneList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneList: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRuneList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 rune) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRuneList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneList: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRuneList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []rune) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewNative(ps.Idx, it, "Go(rune)") + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRuneList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneList: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalRuneList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 rune) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = *env.NewNative(ps.Idx, farg1, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRuneList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneList: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRuneList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalRuneList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneList: expected context to have function Length") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalRuneList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRuneList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneList: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRuneList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalRuneList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneList: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRuneList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalRuneList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalRuneTree struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 rune) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string]rune, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (rune, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 rune) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string]rune) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 rune) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalRuneTree) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalRuneTree) Append(arg0 string, arg1 string, arg2 rune) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalRuneTree) Get() (map[string][]string, map[string]rune, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalRuneTree) GetValue(arg0 string) (rune, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalRuneTree) Prepend(arg0 string, arg1 string, arg2 rune) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalRuneTree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalRuneTree) Set(arg0 map[string][]string, arg1 map[string]rune) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalRuneTree) SetValue(arg0 string, arg1 rune) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalRuneTree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalRuneTree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_ExternalRuneTree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalRuneTree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalRuneTree(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalRuneTree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalRuneTree{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneTree: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalRuneTree: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRuneTree: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneTree: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalRuneTree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 rune) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewNative(ps.Idx, farg2, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRuneTree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneTree: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalRuneTree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string]rune, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string]rune + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string]rune, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV rune + switch v := v.Series.S[i+1].(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"map value: "+"expected native of type rune, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string]rune, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV rune + switch v := dictV.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"map value: "+"expected native of type rune, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.ExternalRuneTree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneTree: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRuneTree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (rune, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 rune + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected native of type rune, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalRuneTree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneTree: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalRuneTree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 rune) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewNative(ps.Idx, farg2, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRuneTree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneTree: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRuneTree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRuneTree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneTree: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalRuneTree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string]rune) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + dVal = *env.NewNative(ps.Idx, mVal, "Go(rune)") + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRuneTree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneTree: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalRuneTree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 rune) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewNative(ps.Idx, farg1, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRuneTree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneTree: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRuneTree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalRuneTree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneTree: expected context to have function ChildIDs") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRuneTree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalRuneTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalRuneTree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneTree: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRuneTree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalRuneTree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalRuneTree: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalRuneTree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalRuneTree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalString struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Get func(self env.RyeCtx) (string, error) + fn_Set func(self env.RyeCtx, arg0 string) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalString) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalString) Get() (string, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalString) Set(arg0 string) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalString) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalString) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalString(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalString, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalString{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalString: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalString: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalString: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalString: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalString: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalString: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalString: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (string, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 string + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalString: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalString: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.String); ok { + res0 = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalString: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalString: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalString: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalString: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalString: expected context to have function Set") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalString: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalString: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalString: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalString: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalString: expected context to have function AddListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalString: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalString: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalString: expected context to have function RemoveListener") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalString: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalString: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalStringList struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 string) error + fn_Get func(self env.RyeCtx) ([]string, error) + fn_GetValue func(self env.RyeCtx, arg0 int) (string, error) + fn_Prepend func(self env.RyeCtx, arg0 string) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 []string) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 string) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalStringList) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalStringList) Append(arg0 string) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_ExternalStringList) Get() ([]string, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalStringList) GetValue(arg0 int) (string, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalStringList) Prepend(arg0 string) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_ExternalStringList) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalStringList) Set(arg0 []string) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalStringList) SetValue(arg0 int, arg1 string) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalStringList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalStringList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_ExternalStringList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalStringList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalStringList(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalStringList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalStringList{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalStringList: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalStringList: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalStringList: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalStringList: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalStringList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalStringList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalStringList: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalStringList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]string, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []string + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalStringList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalStringList: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalStringList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) (string, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 string + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.String); ok { + res0 = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalStringList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalStringList: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalStringList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalStringList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalStringList: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalStringList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalStringList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalStringList: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalStringList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []string) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewString(it) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalStringList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalStringList: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalStringList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 string) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = *env.NewString(farg1) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalStringList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalStringList: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalStringList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalStringList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.ExternalStringList: expected context to have function Length") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalStringList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalStringList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalStringList: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalStringList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalStringList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalStringList: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalStringList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalStringList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalStringTree struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 string) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string]string, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (string, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 string) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string]string) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 string) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalStringTree) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalStringTree) Append(arg0 string, arg1 string, arg2 string) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalStringTree) Get() (map[string][]string, map[string]string, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalStringTree) GetValue(arg0 string) (string, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalStringTree) Prepend(arg0 string, arg1 string, arg2 string) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalStringTree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalStringTree) Set(arg0 map[string][]string, arg1 map[string]string) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalStringTree) SetValue(arg0 string, arg1 string) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalStringTree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalStringTree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_ExternalStringTree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalStringTree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalStringTree(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalStringTree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalStringTree{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalStringTree: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalStringTree: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalStringTree: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalStringTree: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalStringTree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 string) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewString(farg2) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalStringTree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalStringTree: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalStringTree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string]string, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string]string + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV string + if vc, ok := v.Series.S[i+1].(env.String); ok { + mapV = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"map value: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV string + if vc, ok := dictV.(env.String); ok { + mapV = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"map value: "+"expected string, but got "+objectDebugString(ps.Idx, dictV), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.ExternalStringTree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalStringTree: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalStringTree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (string, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 string + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.String); ok { + res0 = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalStringTree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalStringTree: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalStringTree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 string) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewString(farg2) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalStringTree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalStringTree: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalStringTree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalStringTree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalStringTree: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalStringTree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string]string) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + dVal = *env.NewString(mVal) + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalStringTree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalStringTree: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalStringTree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 string) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalStringTree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalStringTree: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalStringTree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalStringTree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.ExternalStringTree: expected context to have function ChildIDs") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalStringTree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalStringTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalStringTree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalStringTree: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalStringTree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalStringTree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalStringTree: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalStringTree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalStringTree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalURI struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Get func(self env.RyeCtx) (fyne.URI, error) + fn_Set func(self env.RyeCtx, arg0 fyne.URI) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalURI) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalURI) Get() (fyne.URI, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalURI) Set(arg0 fyne.URI) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalURI) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalURI) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalURI(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalURI, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalURI{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalURI: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalURI: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURI: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURI: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURI: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalURI: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalURI: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (fyne.URI, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 fyne.URI + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURI: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURI: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURI: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURI: arg 0: callback result: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURI: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURI: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURI: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURI: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalURI: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalURI: expected context to have function Set") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURI: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 fyne.URI) error { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURI: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURI: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURI: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalURI: expected context to have function AddListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURI: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalURI: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalURI: expected context to have function RemoveListener") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURI: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalURI: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalURIList struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 fyne.URI) error + fn_Get func(self env.RyeCtx) ([]fyne.URI, error) + fn_GetValue func(self env.RyeCtx, arg0 int) (fyne.URI, error) + fn_Prepend func(self env.RyeCtx, arg0 fyne.URI) error + fn_Remove func(self env.RyeCtx, arg0 fyne.URI) error + fn_Set func(self env.RyeCtx, arg0 []fyne.URI) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 fyne.URI) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalURIList) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalURIList) Append(arg0 fyne.URI) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_ExternalURIList) Get() ([]fyne.URI, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalURIList) GetValue(arg0 int) (fyne.URI, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalURIList) Prepend(arg0 fyne.URI) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_ExternalURIList) Remove(arg0 fyne.URI) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalURIList) Set(arg0 []fyne.URI) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalURIList) SetValue(arg0 int, arg1 fyne.URI) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalURIList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalURIList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_ExternalURIList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalURIList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalURIList(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalURIList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalURIList{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalURIList: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalURIList: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURIList: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalURIList: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURIList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 fyne.URI) error { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURIList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalURIList: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalURIList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]fyne.URI, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []fyne.URI + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]fyne.URI, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"block item: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"block item: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"block item: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + (*iv) = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"block item: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalURIList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalURIList: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURIList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) (fyne.URI, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URI + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalURIList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalURIList: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURIList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 fyne.URI) error { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURIList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalURIList: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURIList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 fyne.URI) error { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURIList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalURIList: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURIList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []fyne.URI) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.URI)") + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURIList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalURIList: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalURIList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 fyne.URI) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURIList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalURIList: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURIList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalURIList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.ExternalURIList: expected context to have function Length") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalURIList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURIList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURIList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalURIList: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURIList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalURIList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalURIList: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURIList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalURIList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalURITree struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 fyne.URI) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string]fyne.URI, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (fyne.URI, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 fyne.URI) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string]fyne.URI) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 fyne.URI) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalURITree) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalURITree) Append(arg0 string, arg1 string, arg2 fyne.URI) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalURITree) Get() (map[string][]string, map[string]fyne.URI, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalURITree) GetValue(arg0 string) (fyne.URI, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalURITree) Prepend(arg0 string, arg1 string, arg2 fyne.URI) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalURITree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalURITree) Set(arg0 map[string][]string, arg1 map[string]fyne.URI) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalURITree) SetValue(arg0 string, arg1 fyne.URI) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalURITree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalURITree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_ExternalURITree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalURITree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalURITree(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalURITree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalURITree{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalURITree: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalURITree: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURITree: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalURITree: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalURITree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 fyne.URI) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = ifaceToNative(ps.Idx, farg2, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURITree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalURITree: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalURITree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string]fyne.URI, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string]fyne.URI + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string]fyne.URI, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV fyne.URI + switch v := v.Series.S[i+1].(type) { + case env.RyeCtx: + var err error + mapV, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map value: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map value: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string]fyne.URI, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV fyne.URI + switch v := dictV.(type) { + case env.RyeCtx: + var err error + mapV, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map value: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map value: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.ExternalURITree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalURITree: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURITree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (fyne.URI, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URI + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalURITree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalURITree: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalURITree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 fyne.URI) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = ifaceToNative(ps.Idx, farg2, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURITree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalURITree: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURITree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURITree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalURITree: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalURITree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string]fyne.URI) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + dVal = ifaceToNative(ps.Idx, mVal, "Go(fyne.URI)") + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURITree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalURITree: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalURITree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 fyne.URI) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURITree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalURITree: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURITree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalURITree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.ExternalURITree: expected context to have function ChildIDs") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURITree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalURITree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalURITree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalURITree: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURITree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalURITree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalURITree: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalURITree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalURITree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalUntyped struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Get func(self env.RyeCtx) (any, error) + fn_Set func(self env.RyeCtx, arg0 any) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalUntyped) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalUntyped) Get() (any, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalUntyped) Set(arg0 any) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalUntyped) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalUntyped) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalUntyped(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalUntyped, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalUntyped{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalUntyped: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalUntyped: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntyped: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntyped: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntyped: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalUntyped: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalUntyped: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (any, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 any + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntyped: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntyped: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntyped: arg 0: callback result: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntyped: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntyped: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntyped: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalUntyped: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalUntyped: expected context to have function Set") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntyped: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 any) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntyped: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntyped: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntyped: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalUntyped: expected context to have function AddListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntyped: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalUntyped: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalUntyped: expected context to have function RemoveListener") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntyped: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalUntyped: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalUntypedList struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 any) error + fn_Get func(self env.RyeCtx) ([]any, error) + fn_GetValue func(self env.RyeCtx, arg0 int) (any, error) + fn_Prepend func(self env.RyeCtx, arg0 any) error + fn_Remove func(self env.RyeCtx, arg0 any) error + fn_Set func(self env.RyeCtx, arg0 []any) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 any) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalUntypedList) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalUntypedList) Append(arg0 any) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedList) Get() ([]any, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalUntypedList) GetValue(arg0 int) (any, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedList) Prepend(arg0 any) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedList) Remove(arg0 any) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedList) Set(arg0 []any) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedList) SetValue(arg0 int, arg1 any) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalUntypedList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_ExternalUntypedList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalUntypedList(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalUntypedList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalUntypedList{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedList: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalUntypedList: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedList: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedList: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 any) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedList: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalUntypedList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]any, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []any + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]any, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"block item: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"block item: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalUntypedList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedList: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) (any, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 any + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalUntypedList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedList: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 any) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedList: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 any) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedList: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []any) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewNative(ps.Idx, it, "Go(any)") + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedList: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalUntypedList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 any) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = *env.NewNative(ps.Idx, farg1, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedList: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalUntypedList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedList: expected context to have function Length") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalUntypedList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedList: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalUntypedList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedList: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalUntypedList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalUntypedMap struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Delete func(self env.RyeCtx, arg0 string) + fn_Get func(self env.RyeCtx) (map[string]any, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (any, error) + fn_Set func(self env.RyeCtx, arg0 map[string]any) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 any) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_Keys func(self env.RyeCtx) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalUntypedMap) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalUntypedMap) Delete(arg0 string) { + self.fn_Delete(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedMap) Get() (map[string]any, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalUntypedMap) GetValue(arg0 string) (any, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedMap) Set(arg0 map[string]any) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedMap) SetValue(arg0 string, arg1 any) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalUntypedMap) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedMap) Keys() []string { + return self.fn_Keys(self.self) +} + +func (self *iface_binding_ExternalUntypedMap) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedMap) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalUntypedMap(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalUntypedMap, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalUntypedMap{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedMap: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalUntypedMap: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedMap: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["delete"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedMap: expected context to have function Delete") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedMap: context fn Delete: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Delete = func(ctx env.RyeCtx, farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalUntypedMap: context fn Delete: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedMap: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalUntypedMap: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string]any, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string]any + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = make(map[string]any, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + var mapV any + switch v := v.Series.S[i+1].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"map value: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string]any, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV any + switch v := dictV.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"map value: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalUntypedMap: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedMap: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedMap: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (any, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 any + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalUntypedMap: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedMap: expected context to have function Set") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedMap: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string]any) error { + var farg0Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + dVal = *env.NewNative(ps.Idx, mVal, "Go(any)") + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedMap: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedMap: expected context to have function SetValue") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalUntypedMap: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 any) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewNative(ps.Idx, farg1, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedMap: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedMap: expected context to have function GetItem") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedMap: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalUntypedMap: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["keys"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedMap: expected context to have function Keys") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalUntypedMap: context fn Keys: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Keys = func(ctx env.RyeCtx) []string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedMap: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedMap: context fn Keys: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedMap: expected context to have function AddListener") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedMap: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalUntypedMap: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedMap: expected context to have function RemoveListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedMap: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalUntypedMap: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_ExternalUntypedTree struct { + self env.RyeCtx + fn_Reload func(self env.RyeCtx) error + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 any) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string]any, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (any, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 any) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string]any) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 any) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_ExternalUntypedTree) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_ExternalUntypedTree) Append(arg0 string, arg1 string, arg2 any) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalUntypedTree) Get() (map[string][]string, map[string]any, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_ExternalUntypedTree) GetValue(arg0 string) (any, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedTree) Prepend(arg0 string, arg1 string, arg2 any) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_ExternalUntypedTree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedTree) Set(arg0 map[string][]string, arg1 map[string]any) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalUntypedTree) SetValue(arg0 string, arg1 any) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_ExternalUntypedTree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedTree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedTree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_ExternalUntypedTree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_ExternalUntypedTree(ps *env.ProgramState, v env.RyeCtx) (binding.ExternalUntypedTree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_ExternalUntypedTree{ + self: v, + } + ctxObj0, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedTree: expected context to have function Reload") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalUntypedTree: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedTree: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedTree: expected context to have function Append") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalUntypedTree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 any) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewNative(ps.Idx, farg2, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedTree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedTree: expected context to have function Get") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.ExternalUntypedTree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string]any, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string]any + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string]any, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV any + switch v := v.Series.S[i+1].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"map value: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string]any, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV any + switch v := dictV.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"map value: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.ExternalUntypedTree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedTree: expected context to have function GetValue") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedTree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (any, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 any + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalUntypedTree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedTree: expected context to have function Prepend") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.ExternalUntypedTree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 any) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewNative(ps.Idx, farg2, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedTree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedTree: expected context to have function Remove") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedTree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedTree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedTree: expected context to have function Set") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalUntypedTree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string]any) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + dVal = *env.NewNative(ps.Idx, mVal, "Go(any)") + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedTree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedTree: expected context to have function SetValue") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.ExternalUntypedTree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 any) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewNative(ps.Idx, farg1, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedTree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedTree: expected context to have function GetItem") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedTree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.ExternalUntypedTree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedTree: expected context to have function ChildIDs") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedTree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.ExternalUntypedTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.ExternalUntypedTree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedTree: expected context to have function AddListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedTree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalUntypedTree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.ExternalUntypedTree: expected context to have function RemoveListener") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.ExternalUntypedTree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.ExternalUntypedTree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_Float struct { + self env.RyeCtx + fn_Get func(self env.RyeCtx) (float64, error) + fn_Set func(self env.RyeCtx, arg0 float64) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_Float) Get() (float64, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_Float) Set(arg0 float64) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_Float) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_Float) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_Float(ps *env.ProgramState, v env.RyeCtx) (binding.Float, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_Float{ + self: v, + } + ctxObj0, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.Float: expected context to have function Get") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.Float: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (float64, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 float64 + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Float: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Float: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Decimal); ok { + res0 = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Float: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Float: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Float: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.Float: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.Float: expected context to have function Set") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Float: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 float64) error { + var farg0Val env.Object + farg0Val = *env.NewDecimal(float64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Float: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Float: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.Float: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.Float: expected context to have function AddListener") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Float: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.Float: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.Float: expected context to have function RemoveListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Float: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.Float: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_FloatList struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 float64) error + fn_Get func(self env.RyeCtx) ([]float64, error) + fn_GetValue func(self env.RyeCtx, arg0 int) (float64, error) + fn_Prepend func(self env.RyeCtx, arg0 float64) error + fn_Remove func(self env.RyeCtx, arg0 float64) error + fn_Set func(self env.RyeCtx, arg0 []float64) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 float64) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_FloatList) Append(arg0 float64) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_FloatList) Get() ([]float64, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_FloatList) GetValue(arg0 int) (float64, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_FloatList) Prepend(arg0 float64) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_FloatList) Remove(arg0 float64) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_FloatList) Set(arg0 []float64) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_FloatList) SetValue(arg0 int, arg1 float64) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_FloatList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_FloatList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_FloatList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_FloatList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_FloatList(ps *env.ProgramState, v env.RyeCtx) (binding.FloatList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_FloatList{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.FloatList: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.FloatList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 float64) error { + var farg0Val env.Object + farg0Val = *env.NewDecimal(float64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.FloatList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.FloatList: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.FloatList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]float64, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []float64 + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]float64, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + if vc, ok := it.(env.Decimal); ok { + (*iv) = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"block item: "+"expected decimal, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.FloatList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.FloatList: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.FloatList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) (float64, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 float64 + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Decimal); ok { + res0 = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.FloatList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.FloatList: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.FloatList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 float64) error { + var farg0Val env.Object + farg0Val = *env.NewDecimal(float64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.FloatList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.FloatList: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.FloatList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 float64) error { + var farg0Val env.Object + farg0Val = *env.NewDecimal(float64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.FloatList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.FloatList: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.FloatList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []float64) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewDecimal(float64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.FloatList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.FloatList: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.FloatList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 float64) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = *env.NewDecimal(float64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.FloatList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.FloatList: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.FloatList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.FloatList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.FloatList: expected context to have function Length") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.FloatList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.FloatList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.FloatList: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.FloatList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.FloatList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.FloatList: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.FloatList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.FloatList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_FloatTree struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 float64) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string]float64, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (float64, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 float64) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string]float64) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 float64) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_FloatTree) Append(arg0 string, arg1 string, arg2 float64) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_FloatTree) Get() (map[string][]string, map[string]float64, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_FloatTree) GetValue(arg0 string) (float64, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_FloatTree) Prepend(arg0 string, arg1 string, arg2 float64) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_FloatTree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_FloatTree) Set(arg0 map[string][]string, arg1 map[string]float64) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_FloatTree) SetValue(arg0 string, arg1 float64) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_FloatTree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_FloatTree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_FloatTree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_FloatTree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_FloatTree(ps *env.ProgramState, v env.RyeCtx) (binding.FloatTree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_FloatTree{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.FloatTree: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.FloatTree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 float64) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewDecimal(float64(farg2)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.FloatTree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.FloatTree: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.FloatTree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string]float64, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string]float64 + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string]float64, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV float64 + if vc, ok := v.Series.S[i+1].(env.Decimal); ok { + mapV = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"map value: "+"expected decimal, but got "+objectDebugString(ps.Idx, v.Series.S[i+1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string]float64, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV float64 + if vc, ok := dictV.(env.Decimal); ok { + mapV = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"map value: "+"expected decimal, but got "+objectDebugString(ps.Idx, dictV), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.FloatTree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.FloatTree: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.FloatTree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (float64, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 float64 + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Decimal); ok { + res0 = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.FloatTree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.FloatTree: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.FloatTree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 float64) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewDecimal(float64(farg2)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.FloatTree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.FloatTree: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.FloatTree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.FloatTree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.FloatTree: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.FloatTree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string]float64) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + dVal = *env.NewDecimal(float64(mVal)) + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.FloatTree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.FloatTree: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.FloatTree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 float64) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewDecimal(float64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.FloatTree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.FloatTree: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.FloatTree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.FloatTree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.FloatTree: expected context to have function ChildIDs") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.FloatTree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.FloatTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.FloatTree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.FloatTree: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.FloatTree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.FloatTree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.FloatTree: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.FloatTree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.FloatTree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_Int struct { + self env.RyeCtx + fn_Get func(self env.RyeCtx) (int, error) + fn_Set func(self env.RyeCtx, arg0 int) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_Int) Get() (int, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_Int) Set(arg0 int) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_Int) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_Int) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_Int(ps *env.ProgramState, v env.RyeCtx) (binding.Int, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_Int{ + self: v, + } + ctxObj0, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.Int: expected context to have function Get") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.Int: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (int, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 int + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Int: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Int: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Int: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Int: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Int: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.Int: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.Int: expected context to have function Set") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Int: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 int) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Int: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Int: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.Int: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.Int: expected context to have function AddListener") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Int: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.Int: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.Int: expected context to have function RemoveListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Int: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.Int: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_IntList struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 int) error + fn_Get func(self env.RyeCtx) ([]int, error) + fn_GetValue func(self env.RyeCtx, arg0 int) (int, error) + fn_Prepend func(self env.RyeCtx, arg0 int) error + fn_Remove func(self env.RyeCtx, arg0 int) error + fn_Set func(self env.RyeCtx, arg0 []int) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 int) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_IntList) Append(arg0 int) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_IntList) Get() ([]int, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_IntList) GetValue(arg0 int) (int, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_IntList) Prepend(arg0 int) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_IntList) Remove(arg0 int) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_IntList) Set(arg0 []int) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_IntList) SetValue(arg0 int, arg1 int) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_IntList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_IntList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_IntList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_IntList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_IntList(ps *env.ProgramState, v env.RyeCtx) (binding.IntList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_IntList{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.IntList: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.IntList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 int) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.IntList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.IntList: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.IntList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]int, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []int + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]int, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.IntList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.IntList: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.IntList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) (int, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 int + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.IntList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.IntList: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.IntList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 int) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.IntList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.IntList: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.IntList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 int) error { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.IntList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.IntList: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.IntList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []int) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewInteger(int64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.IntList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.IntList: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.IntList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 int) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = *env.NewInteger(int64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.IntList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.IntList: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.IntList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.IntList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.IntList: expected context to have function Length") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.IntList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.IntList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.IntList: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.IntList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.IntList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.IntList: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.IntList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.IntList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_IntTree struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 int) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string]int, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (int, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 int) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string]int) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 int) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_IntTree) Append(arg0 string, arg1 string, arg2 int) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_IntTree) Get() (map[string][]string, map[string]int, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_IntTree) GetValue(arg0 string) (int, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_IntTree) Prepend(arg0 string, arg1 string, arg2 int) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_IntTree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_IntTree) Set(arg0 map[string][]string, arg1 map[string]int) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_IntTree) SetValue(arg0 string, arg1 int) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_IntTree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_IntTree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_IntTree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_IntTree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_IntTree(ps *env.ProgramState, v env.RyeCtx) (binding.IntTree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_IntTree{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.IntTree: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.IntTree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 int) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewInteger(int64(farg2)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.IntTree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.IntTree: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.IntTree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string]int, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string]int + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string]int, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV int + if vc, ok := v.Series.S[i+1].(env.Integer); ok { + mapV = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"map value: "+"expected integer, but got "+objectDebugString(ps.Idx, v.Series.S[i+1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string]int, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV int + if vc, ok := dictV.(env.Integer); ok { + mapV = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"map value: "+"expected integer, but got "+objectDebugString(ps.Idx, dictV), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.IntTree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.IntTree: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.IntTree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (int, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 int + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.IntTree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.IntTree: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.IntTree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 int) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewInteger(int64(farg2)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.IntTree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.IntTree: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.IntTree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.IntTree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.IntTree: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.IntTree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string]int) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + dVal = *env.NewInteger(int64(mVal)) + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.IntTree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.IntTree: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.IntTree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 int) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewInteger(int64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.IntTree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.IntTree: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.IntTree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.IntTree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.IntTree: expected context to have function ChildIDs") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.IntTree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.IntTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.IntTree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.IntTree: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.IntTree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.IntTree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.IntTree: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.IntTree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.IntTree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_Rune struct { + self env.RyeCtx + fn_Get func(self env.RyeCtx) (rune, error) + fn_Set func(self env.RyeCtx, arg0 rune) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_Rune) Get() (rune, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_Rune) Set(arg0 rune) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_Rune) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_Rune) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_Rune(ps *env.ProgramState, v env.RyeCtx) (binding.Rune, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_Rune{ + self: v, + } + ctxObj0, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.Rune: expected context to have function Get") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.Rune: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (rune, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 rune + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Rune: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Rune: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Rune: arg 0: callback result: "+"expected native of type rune, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Rune: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Rune: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Rune: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.Rune: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.Rune: expected context to have function Set") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Rune: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 rune) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Rune: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Rune: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.Rune: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.Rune: expected context to have function AddListener") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Rune: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.Rune: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.Rune: expected context to have function RemoveListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Rune: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.Rune: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_RuneList struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 rune) error + fn_Get func(self env.RyeCtx) ([]rune, error) + fn_GetValue func(self env.RyeCtx, arg0 int) (rune, error) + fn_Prepend func(self env.RyeCtx, arg0 rune) error + fn_Remove func(self env.RyeCtx, arg0 rune) error + fn_Set func(self env.RyeCtx, arg0 []rune) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 rune) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_RuneList) Append(arg0 rune) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_RuneList) Get() ([]rune, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_RuneList) GetValue(arg0 int) (rune, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_RuneList) Prepend(arg0 rune) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_RuneList) Remove(arg0 rune) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_RuneList) Set(arg0 []rune) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_RuneList) SetValue(arg0 int, arg1 rune) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_RuneList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_RuneList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_RuneList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_RuneList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_RuneList(ps *env.ProgramState, v env.RyeCtx) (binding.RuneList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_RuneList{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.RuneList: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.RuneList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 rune) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.RuneList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.RuneList: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.RuneList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]rune, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []rune + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]rune, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"block item: "+"expected native of type rune, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"block item: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.RuneList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.RuneList: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.RuneList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) (rune, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 rune + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected native of type rune, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.RuneList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.RuneList: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.RuneList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 rune) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.RuneList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.RuneList: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.RuneList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 rune) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.RuneList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.RuneList: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.RuneList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []rune) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewNative(ps.Idx, it, "Go(rune)") + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.RuneList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.RuneList: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.RuneList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 rune) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = *env.NewNative(ps.Idx, farg1, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.RuneList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.RuneList: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.RuneList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.RuneList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.RuneList: expected context to have function Length") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.RuneList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.RuneList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.RuneList: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.RuneList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.RuneList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.RuneList: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.RuneList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.RuneList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_RuneTree struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 rune) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string]rune, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (rune, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 rune) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string]rune) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 rune) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_RuneTree) Append(arg0 string, arg1 string, arg2 rune) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_RuneTree) Get() (map[string][]string, map[string]rune, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_RuneTree) GetValue(arg0 string) (rune, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_RuneTree) Prepend(arg0 string, arg1 string, arg2 rune) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_RuneTree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_RuneTree) Set(arg0 map[string][]string, arg1 map[string]rune) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_RuneTree) SetValue(arg0 string, arg1 rune) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_RuneTree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_RuneTree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_RuneTree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_RuneTree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_RuneTree(ps *env.ProgramState, v env.RyeCtx) (binding.RuneTree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_RuneTree{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.RuneTree: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.RuneTree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 rune) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewNative(ps.Idx, farg2, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.RuneTree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.RuneTree: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.RuneTree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string]rune, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string]rune + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string]rune, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV rune + switch v := v.Series.S[i+1].(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"map value: "+"expected native of type rune, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string]rune, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV rune + switch v := dictV.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"map value: "+"expected native of type rune, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.RuneTree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.RuneTree: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.RuneTree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (rune, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 rune + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected native of type rune, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.RuneTree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.RuneTree: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.RuneTree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 rune) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewNative(ps.Idx, farg2, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.RuneTree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.RuneTree: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.RuneTree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.RuneTree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.RuneTree: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.RuneTree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string]rune) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + dVal = *env.NewNative(ps.Idx, mVal, "Go(rune)") + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.RuneTree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.RuneTree: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.RuneTree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 rune) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewNative(ps.Idx, farg1, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.RuneTree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.RuneTree: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.RuneTree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.RuneTree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.RuneTree: expected context to have function ChildIDs") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.RuneTree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.RuneTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.RuneTree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.RuneTree: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.RuneTree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.RuneTree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.RuneTree: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.RuneTree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.RuneTree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_String struct { + self env.RyeCtx + fn_Get func(self env.RyeCtx) (string, error) + fn_Set func(self env.RyeCtx, arg0 string) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_String) Get() (string, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_String) Set(arg0 string) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_String) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_String) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_String(ps *env.ProgramState, v env.RyeCtx) (binding.String, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_String{ + self: v, + } + ctxObj0, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.String: expected context to have function Get") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.String: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (string, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 string + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.String: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.String: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.String); ok { + res0 = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.String: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.String: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.String: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.String: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.String: expected context to have function Set") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.String: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.String: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.String: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.String: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.String: expected context to have function AddListener") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.String: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.String: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.String: expected context to have function RemoveListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.String: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.String: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_StringList struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 string) error + fn_Get func(self env.RyeCtx) ([]string, error) + fn_GetValue func(self env.RyeCtx, arg0 int) (string, error) + fn_Prepend func(self env.RyeCtx, arg0 string) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 []string) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 string) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_StringList) Append(arg0 string) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_StringList) Get() ([]string, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_StringList) GetValue(arg0 int) (string, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_StringList) Prepend(arg0 string) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_StringList) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_StringList) Set(arg0 []string) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_StringList) SetValue(arg0 int, arg1 string) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_StringList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_StringList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_StringList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_StringList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_StringList(ps *env.ProgramState, v env.RyeCtx) (binding.StringList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_StringList{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.StringList: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.StringList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.StringList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.StringList: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.StringList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]string, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []string + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.StringList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.StringList: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.StringList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) (string, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 string + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.String); ok { + res0 = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.StringList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.StringList: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.StringList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.StringList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.StringList: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.StringList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.StringList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.StringList: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.StringList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []string) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewString(it) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.StringList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.StringList: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.StringList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 string) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = *env.NewString(farg1) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.StringList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.StringList: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.StringList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.StringList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.StringList: expected context to have function Length") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.StringList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.StringList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.StringList: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.StringList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.StringList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.StringList: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.StringList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.StringList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_StringTree struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 string) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string]string, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (string, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 string) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string]string) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 string) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_StringTree) Append(arg0 string, arg1 string, arg2 string) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_StringTree) Get() (map[string][]string, map[string]string, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_StringTree) GetValue(arg0 string) (string, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_StringTree) Prepend(arg0 string, arg1 string, arg2 string) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_StringTree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_StringTree) Set(arg0 map[string][]string, arg1 map[string]string) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_StringTree) SetValue(arg0 string, arg1 string) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_StringTree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_StringTree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_StringTree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_StringTree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_StringTree(ps *env.ProgramState, v env.RyeCtx) (binding.StringTree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_StringTree{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.StringTree: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.StringTree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 string) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewString(farg2) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.StringTree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.StringTree: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.StringTree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string]string, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string]string + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV string + if vc, ok := v.Series.S[i+1].(env.String); ok { + mapV = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"map value: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV string + if vc, ok := dictV.(env.String); ok { + mapV = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"map value: "+"expected string, but got "+objectDebugString(ps.Idx, dictV), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.StringTree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.StringTree: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.StringTree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (string, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 string + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.String); ok { + res0 = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.StringTree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.StringTree: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.StringTree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 string) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewString(farg2) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.StringTree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.StringTree: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.StringTree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.StringTree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.StringTree: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.StringTree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string]string) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + dVal = *env.NewString(mVal) + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.StringTree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.StringTree: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.StringTree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 string) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.StringTree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.StringTree: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.StringTree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.StringTree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.StringTree: expected context to have function ChildIDs") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.StringTree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.StringTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.StringTree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.StringTree: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.StringTree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.StringTree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.StringTree: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.StringTree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.StringTree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_Struct struct { + self env.RyeCtx + fn_GetValue func(self env.RyeCtx, arg0 string) (any, error) + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 any) error + fn_Reload func(self env.RyeCtx) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_Keys func(self env.RyeCtx) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_Struct) GetValue(arg0 string) (any, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_Struct) SetValue(arg0 string, arg1 any) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_Struct) Reload() error { + return self.fn_Reload(self.self) +} + +func (self *iface_binding_Struct) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_Struct) Keys() []string { + return self.fn_Keys(self.self) +} + +func (self *iface_binding_Struct) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_Struct) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_Struct(ps *env.ProgramState, v env.RyeCtx) (binding.Struct, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_Struct{ + self: v, + } + ctxObj0, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.Struct: expected context to have function GetValue") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Struct: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (any, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 any + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.Struct: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.Struct: expected context to have function SetValue") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.Struct: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 any) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewNative(ps.Idx, farg1, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.Struct: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["reload"] + if !ok { + return nil, errors.New("context to binding.Struct: expected context to have function Reload") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.Struct: context fn Reload: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reload = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.Struct: context fn Reload: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.Struct: expected context to have function GetItem") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Struct: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.Struct: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["keys"] + if !ok { + return nil, errors.New("context to binding.Struct: expected context to have function Keys") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.Struct: context fn Keys: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Keys = func(ctx env.RyeCtx) []string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Struct: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.Struct: context fn Keys: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.Struct: expected context to have function AddListener") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Struct: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.Struct: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.Struct: expected context to have function RemoveListener") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Struct: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.Struct: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_URI struct { + self env.RyeCtx + fn_Get func(self env.RyeCtx) (fyne.URI, error) + fn_Set func(self env.RyeCtx, arg0 fyne.URI) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_URI) Get() (fyne.URI, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_URI) Set(arg0 fyne.URI) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_URI) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_URI) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_URI(ps *env.ProgramState, v env.RyeCtx) (binding.URI, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_URI{ + self: v, + } + ctxObj0, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.URI: expected context to have function Get") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.URI: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (fyne.URI, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 fyne.URI + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URI: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URI: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URI: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URI: arg 0: callback result: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URI: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URI: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URI: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URI: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.URI: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.URI: expected context to have function Set") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URI: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 fyne.URI) error { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URI: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URI: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.URI: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.URI: expected context to have function AddListener") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URI: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.URI: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.URI: expected context to have function RemoveListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URI: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.URI: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_URIList struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 fyne.URI) error + fn_Get func(self env.RyeCtx) ([]fyne.URI, error) + fn_GetValue func(self env.RyeCtx, arg0 int) (fyne.URI, error) + fn_Prepend func(self env.RyeCtx, arg0 fyne.URI) error + fn_Remove func(self env.RyeCtx, arg0 fyne.URI) error + fn_Set func(self env.RyeCtx, arg0 []fyne.URI) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 fyne.URI) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_URIList) Append(arg0 fyne.URI) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_URIList) Get() ([]fyne.URI, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_URIList) GetValue(arg0 int) (fyne.URI, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_URIList) Prepend(arg0 fyne.URI) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_URIList) Remove(arg0 fyne.URI) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_URIList) Set(arg0 []fyne.URI) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_URIList) SetValue(arg0 int, arg1 fyne.URI) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_URIList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_URIList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_URIList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_URIList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_URIList(ps *env.ProgramState, v env.RyeCtx) (binding.URIList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_URIList{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.URIList: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URIList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 fyne.URI) error { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.URIList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.URIList: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.URIList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]fyne.URI, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []fyne.URI + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]fyne.URI, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"block item: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"block item: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"block item: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + (*iv) = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"block item: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.URIList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.URIList: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URIList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) (fyne.URI, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URI + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.URIList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.URIList: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URIList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 fyne.URI) error { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.URIList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.URIList: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URIList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 fyne.URI) error { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.URIList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.URIList: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URIList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []fyne.URI) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.URI)") + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.URIList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.URIList: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.URIList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 fyne.URI) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.URIList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.URIList: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URIList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.URIList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.URIList: expected context to have function Length") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.URIList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URIList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.URIList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.URIList: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URIList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.URIList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.URIList: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URIList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.URIList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_URITree struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 fyne.URI) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string]fyne.URI, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (fyne.URI, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 fyne.URI) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string]fyne.URI) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 fyne.URI) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_URITree) Append(arg0 string, arg1 string, arg2 fyne.URI) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_URITree) Get() (map[string][]string, map[string]fyne.URI, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_URITree) GetValue(arg0 string) (fyne.URI, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_URITree) Prepend(arg0 string, arg1 string, arg2 fyne.URI) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_URITree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_URITree) Set(arg0 map[string][]string, arg1 map[string]fyne.URI) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_URITree) SetValue(arg0 string, arg1 fyne.URI) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_URITree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_URITree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_URITree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_URITree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_URITree(ps *env.ProgramState, v env.RyeCtx) (binding.URITree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_URITree{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.URITree: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.URITree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 fyne.URI) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = ifaceToNative(ps.Idx, farg2, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.URITree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.URITree: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.URITree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string]fyne.URI, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string]fyne.URI + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string]fyne.URI, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV fyne.URI + switch v := v.Series.S[i+1].(type) { + case env.RyeCtx: + var err error + mapV, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map value: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map value: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string]fyne.URI, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV fyne.URI + switch v := dictV.(type) { + case env.RyeCtx: + var err error + mapV, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map value: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map value: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.URITree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.URITree: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URITree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (fyne.URI, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URI + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.URITree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.URITree: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.URITree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 fyne.URI) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = ifaceToNative(ps.Idx, farg2, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.URITree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.URITree: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URITree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.URITree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.URITree: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.URITree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string]fyne.URI) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + dVal = ifaceToNative(ps.Idx, mVal, "Go(fyne.URI)") + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.URITree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.URITree: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.URITree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 fyne.URI) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.URITree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.URITree: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URITree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.URITree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.URITree: expected context to have function ChildIDs") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URITree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.URITree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.URITree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.URITree: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URITree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.URITree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.URITree: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.URITree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.URITree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_Untyped struct { + self env.RyeCtx + fn_Get func(self env.RyeCtx) (any, error) + fn_Set func(self env.RyeCtx, arg0 any) error + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_Untyped) Get() (any, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_Untyped) Set(arg0 any) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_Untyped) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_Untyped) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_Untyped(ps *env.ProgramState, v env.RyeCtx) (binding.Untyped, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_Untyped{ + self: v, + } + ctxObj0, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.Untyped: expected context to have function Get") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.Untyped: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (any, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 any + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Untyped: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Untyped: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Untyped: arg 0: callback result: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Untyped: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Untyped: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Untyped: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.Untyped: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.Untyped: expected context to have function Set") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Untyped: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 any) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Untyped: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.Untyped: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.Untyped: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.Untyped: expected context to have function AddListener") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Untyped: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.Untyped: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.Untyped: expected context to have function RemoveListener") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.Untyped: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.Untyped: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_UntypedList struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 any) error + fn_Get func(self env.RyeCtx) ([]any, error) + fn_GetValue func(self env.RyeCtx, arg0 int) (any, error) + fn_Prepend func(self env.RyeCtx, arg0 any) error + fn_Remove func(self env.RyeCtx, arg0 any) error + fn_Set func(self env.RyeCtx, arg0 []any) error + fn_SetValue func(self env.RyeCtx, arg0 int, arg1 any) error + fn_GetItem func(self env.RyeCtx, arg0 int) (binding.DataItem, error) + fn_Length func(self env.RyeCtx) int + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_UntypedList) Append(arg0 any) error { + return self.fn_Append(self.self, arg0) +} + +func (self *iface_binding_UntypedList) Get() ([]any, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_UntypedList) GetValue(arg0 int) (any, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_UntypedList) Prepend(arg0 any) error { + return self.fn_Prepend(self.self, arg0) +} + +func (self *iface_binding_UntypedList) Remove(arg0 any) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_UntypedList) Set(arg0 []any) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_UntypedList) SetValue(arg0 int, arg1 any) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_UntypedList) GetItem(arg0 int) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_UntypedList) Length() int { + return self.fn_Length(self.self) +} + +func (self *iface_binding_UntypedList) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_UntypedList) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_UntypedList(ps *env.ProgramState, v env.RyeCtx) (binding.UntypedList, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_UntypedList{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.UntypedList: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedList: context fn Append: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 any) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.UntypedList: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.UntypedList: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.UntypedList: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) ([]any, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []any + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]any, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"block item: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"block item: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.UntypedList: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.UntypedList: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedList: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 int) (any, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 any + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.UntypedList: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.UntypedList: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedList: context fn Prepend: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 any) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.UntypedList: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.UntypedList: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedList: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 any) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.UntypedList: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.UntypedList: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedList: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 []any) error { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewNative(ps.Idx, it, "Go(any)") + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.UntypedList: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.UntypedList: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.UntypedList: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 int, farg1 any) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = *env.NewNative(ps.Idx, farg1, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.UntypedList: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.UntypedList: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedList: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 int) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.UntypedList: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["length"] + if !ok { + return nil, errors.New("context to binding.UntypedList: expected context to have function Length") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.UntypedList: context fn Length: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Length = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedList: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.UntypedList: context fn Length: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.UntypedList: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedList: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.UntypedList: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.UntypedList: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedList: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.UntypedList: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_UntypedMap struct { + self env.RyeCtx + fn_Delete func(self env.RyeCtx, arg0 string) + fn_Get func(self env.RyeCtx) (map[string]any, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (any, error) + fn_Set func(self env.RyeCtx, arg0 map[string]any) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 any) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_Keys func(self env.RyeCtx) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_UntypedMap) Delete(arg0 string) { + self.fn_Delete(self.self, arg0) +} + +func (self *iface_binding_UntypedMap) Get() (map[string]any, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_UntypedMap) GetValue(arg0 string) (any, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_UntypedMap) Set(arg0 map[string]any) error { + return self.fn_Set(self.self, arg0) +} + +func (self *iface_binding_UntypedMap) SetValue(arg0 string, arg1 any) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_UntypedMap) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_UntypedMap) Keys() []string { + return self.fn_Keys(self.self) +} + +func (self *iface_binding_UntypedMap) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_UntypedMap) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_UntypedMap(ps *env.ProgramState, v env.RyeCtx) (binding.UntypedMap, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_UntypedMap{ + self: v, + } + ctxObj0, ok := wordToObj["delete"] + if !ok { + return nil, errors.New("context to binding.UntypedMap: expected context to have function Delete") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedMap: context fn Delete: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Delete = func(ctx env.RyeCtx, farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.UntypedMap: context fn Delete: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.UntypedMap: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.UntypedMap: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string]any, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string]any + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = make(map[string]any, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + var mapV any + switch v := v.Series.S[i+1].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"map value: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string]any, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV any + switch v := dictV.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"map value: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.UntypedMap: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.UntypedMap: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedMap: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (any, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 any + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.UntypedMap: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.UntypedMap: expected context to have function Set") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedMap: context fn Set: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string]any) error { + var farg0Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + dVal = *env.NewNative(ps.Idx, mVal, "Go(any)") + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.UntypedMap: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.UntypedMap: expected context to have function SetValue") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.UntypedMap: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 any) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewNative(ps.Idx, farg1, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.UntypedMap: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.UntypedMap: expected context to have function GetItem") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedMap: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.UntypedMap: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["keys"] + if !ok { + return nil, errors.New("context to binding.UntypedMap: expected context to have function Keys") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.UntypedMap: context fn Keys: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Keys = func(ctx env.RyeCtx) []string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedMap: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.UntypedMap: context fn Keys: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.UntypedMap: expected context to have function AddListener") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedMap: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.UntypedMap: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.UntypedMap: expected context to have function RemoveListener") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedMap: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.UntypedMap: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_binding_UntypedTree struct { + self env.RyeCtx + fn_Append func(self env.RyeCtx, arg0 string, arg1 string, arg2 any) error + fn_Get func(self env.RyeCtx) (map[string][]string, map[string]any, error) + fn_GetValue func(self env.RyeCtx, arg0 string) (any, error) + fn_Prepend func(self env.RyeCtx, arg0 string, arg1 string, arg2 any) error + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_Set func(self env.RyeCtx, arg0 map[string][]string, arg1 map[string]any) error + fn_SetValue func(self env.RyeCtx, arg0 string, arg1 any) error + fn_GetItem func(self env.RyeCtx, arg0 string) (binding.DataItem, error) + fn_ChildIDs func(self env.RyeCtx, arg0 string) []string + fn_AddListener func(self env.RyeCtx, arg0 binding.DataListener) + fn_RemoveListener func(self env.RyeCtx, arg0 binding.DataListener) +} + +func (self *iface_binding_UntypedTree) Append(arg0 string, arg1 string, arg2 any) error { + return self.fn_Append(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_UntypedTree) Get() (map[string][]string, map[string]any, error) { + return self.fn_Get(self.self) +} + +func (self *iface_binding_UntypedTree) GetValue(arg0 string) (any, error) { + return self.fn_GetValue(self.self, arg0) +} + +func (self *iface_binding_UntypedTree) Prepend(arg0 string, arg1 string, arg2 any) error { + return self.fn_Prepend(self.self, arg0, arg1, arg2) +} + +func (self *iface_binding_UntypedTree) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_binding_UntypedTree) Set(arg0 map[string][]string, arg1 map[string]any) error { + return self.fn_Set(self.self, arg0, arg1) +} + +func (self *iface_binding_UntypedTree) SetValue(arg0 string, arg1 any) error { + return self.fn_SetValue(self.self, arg0, arg1) +} + +func (self *iface_binding_UntypedTree) GetItem(arg0 string) (binding.DataItem, error) { + return self.fn_GetItem(self.self, arg0) +} + +func (self *iface_binding_UntypedTree) ChildIDs(arg0 string) []string { + return self.fn_ChildIDs(self.self, arg0) +} + +func (self *iface_binding_UntypedTree) AddListener(arg0 binding.DataListener) { + self.fn_AddListener(self.self, arg0) +} + +func (self *iface_binding_UntypedTree) RemoveListener(arg0 binding.DataListener) { + self.fn_RemoveListener(self.self, arg0) +} + +func ctxTo_binding_UntypedTree(ps *env.ProgramState, v env.RyeCtx) (binding.UntypedTree, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_binding_UntypedTree{ + self: v, + } + ctxObj0, ok := wordToObj["append"] + if !ok { + return nil, errors.New("context to binding.UntypedTree: expected context to have function Append") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.UntypedTree: context fn Append: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Append = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 any) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewNative(ps.Idx, farg2, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.UntypedTree: context fn Append: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["get"] + if !ok { + return nil, errors.New("context to binding.UntypedTree: expected context to have function Get") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to binding.UntypedTree: context fn Get: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Get = func(ctx env.RyeCtx) (map[string][]string, map[string]any, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 map[string][]string + var res1 map[string]any + var res2 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Dict: + res0 = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"map value: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"map value: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + mapV = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"map value: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[1].(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected block to have length of multiple of 2, but got block with length "+strconv.Itoa(len(v.Series.S)), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = make(map[string]any, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"map key: "+"expected string, but got "+objectDebugString(ps.Idx, v.Series.S[i+0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + var mapV any + switch v := v.Series.S[i+1].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"map value: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Dict: + res1 = make(map[string]any, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV any + switch v := dictV.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"map value: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"map value: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected block, dict or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[2].(type) { + case env.String: + res2 = errors.New(v.Value) + case env.Error: + res2 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + res2 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to binding.UntypedTree: context fn Get: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["get-value"] + if !ok { + return nil, errors.New("context to binding.UntypedTree: expected context to have function GetValue") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedTree: context fn GetValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetValue = func(ctx env.RyeCtx, farg0 string) (any, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 any + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected native of type any, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.UntypedTree: context fn GetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["prepend"] + if !ok { + return nil, errors.New("context to binding.UntypedTree: expected context to have function Prepend") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 3 { + return nil, errors.New("context to binding.UntypedTree: context fn Prepend: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Prepend = func(ctx env.RyeCtx, farg0 string, farg1 string, farg2 any) error { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + farg2Val = *env.NewNative(ps.Idx, farg2, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.UntypedTree: context fn Prepend: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to binding.UntypedTree: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedTree: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.UntypedTree: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set"] + if !ok { + return nil, errors.New("context to binding.UntypedTree: expected context to have function Set") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.UntypedTree: context fn Set: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Set = func(ctx env.RyeCtx, farg0 map[string][]string, farg1 map[string]any) error { + var farg0Val, farg1Val env.Object + { + data := make(map[string]any, len(farg0)) + for mKey, mVal := range farg0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + farg0Val = *env.NewDict(data) + } + { + data := make(map[string]any, len(farg1)) + for mKey, mVal := range farg1 { + var dVal env.Object + dVal = *env.NewNative(ps.Idx, mVal, "Go(any)") + data[mKey] = dVal + } + farg1Val = *env.NewDict(data) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.UntypedTree: context fn Set: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["set-value"] + if !ok { + return nil, errors.New("context to binding.UntypedTree: expected context to have function SetValue") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to binding.UntypedTree: context fn SetValue: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetValue = func(ctx env.RyeCtx, farg0 string, farg1 any) error { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewNative(ps.Idx, farg1, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.UntypedTree: context fn SetValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["get-item"] + if !ok { + return nil, errors.New("context to binding.UntypedTree: expected context to have function GetItem") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedTree: context fn GetItem: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GetItem = func(ctx env.RyeCtx, farg0 string) (binding.DataItem, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 binding.DataItem + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected native of type binding.DataItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to binding.UntypedTree: context fn GetItem: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["child-i-ds"] + if !ok { + return nil, errors.New("context to binding.UntypedTree: expected context to have function ChildIDs") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedTree: context fn ChildIDs: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChildIDs = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to binding.UntypedTree: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to binding.UntypedTree: context fn ChildIDs: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["add-listener"] + if !ok { + return nil, errors.New("context to binding.UntypedTree: expected context to have function AddListener") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedTree: context fn AddListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.UntypedTree: context fn AddListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["remove-listener"] + if !ok { + return nil, errors.New("context to binding.UntypedTree: expected context to have function RemoveListener") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to binding.UntypedTree: context fn RemoveListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveListener = func(ctx env.RyeCtx, farg0 binding.DataListener) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataListener)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to binding.UntypedTree: context fn RemoveListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_desktop_App struct { + self env.RyeCtx + fn_SetSystemTrayMenu func(self env.RyeCtx, arg0 *fyne.Menu) + fn_SetSystemTrayIcon func(self env.RyeCtx, arg0 fyne.Resource) +} + +func (self *iface_desktop_App) SetSystemTrayMenu(arg0 *fyne.Menu) { + self.fn_SetSystemTrayMenu(self.self, arg0) +} + +func (self *iface_desktop_App) SetSystemTrayIcon(arg0 fyne.Resource) { + self.fn_SetSystemTrayIcon(self.self, arg0) +} + +func ctxTo_desktop_App(ps *env.ProgramState, v env.RyeCtx) (desktop.App, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_desktop_App{ + self: v, + } + ctxObj0, ok := wordToObj["set-system-tray-menu"] + if !ok { + return nil, errors.New("context to desktop.App: expected context to have function SetSystemTrayMenu") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to desktop.App: context fn SetSystemTrayMenu: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetSystemTrayMenu = func(ctx env.RyeCtx, farg0 *fyne.Menu) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.Menu)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to desktop.App: context fn SetSystemTrayMenu: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set-system-tray-icon"] + if !ok { + return nil, errors.New("context to desktop.App: expected context to have function SetSystemTrayIcon") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to desktop.App: context fn SetSystemTrayIcon: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetSystemTrayIcon = func(ctx env.RyeCtx, farg0 fyne.Resource) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Resource)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to desktop.App: context fn SetSystemTrayIcon: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_desktop_Canvas struct { + self env.RyeCtx + fn_OnKeyDown func(self env.RyeCtx) func(*fyne.KeyEvent) + fn_SetOnKeyDown func(self env.RyeCtx, arg0 func(*fyne.KeyEvent)) + fn_OnKeyUp func(self env.RyeCtx) func(*fyne.KeyEvent) + fn_SetOnKeyUp func(self env.RyeCtx, arg0 func(*fyne.KeyEvent)) +} + +func (self *iface_desktop_Canvas) OnKeyDown() func(*fyne.KeyEvent) { + return self.fn_OnKeyDown(self.self) +} + +func (self *iface_desktop_Canvas) SetOnKeyDown(arg0 func(*fyne.KeyEvent)) { + self.fn_SetOnKeyDown(self.self, arg0) +} + +func (self *iface_desktop_Canvas) OnKeyUp() func(*fyne.KeyEvent) { + return self.fn_OnKeyUp(self.self) +} + +func (self *iface_desktop_Canvas) SetOnKeyUp(arg0 func(*fyne.KeyEvent)) { + self.fn_SetOnKeyUp(self.self, arg0) +} + +func ctxTo_desktop_Canvas(ps *env.ProgramState, v env.RyeCtx) (desktop.Canvas, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_desktop_Canvas{ + self: v, + } + ctxObj0, ok := wordToObj["on-key-down"] + if !ok { + return nil, errors.New("context to desktop.Canvas: expected context to have function OnKeyDown") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to desktop.Canvas: context fn OnKeyDown: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_OnKeyDown = func(ctx env.RyeCtx) func(*fyne.KeyEvent) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res func(*fyne.KeyEvent) + switch fn := ps.Res.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Canvas: arg 0: callback result: "+"expected 1 function arguments, but got "+strconv.Itoa(fn.Argsn), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = func(farg0 *fyne.KeyEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.KeyEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Canvas: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(fn.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Canvas: arg 0: callback result: "+"expected function or nil, but got "+objectDebugString(ps.Idx, fn), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to desktop.Canvas: context fn OnKeyDown: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set-on-key-down"] + if !ok { + return nil, errors.New("context to desktop.Canvas: expected context to have function SetOnKeyDown") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to desktop.Canvas: context fn SetOnKeyDown: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetOnKeyDown = func(ctx env.RyeCtx, farg0 func(*fyne.KeyEvent)) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.KeyEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("context to desktop.Canvas: arg 1: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("context to desktop.Canvas: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("context to desktop.Canvas: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + farg0(arg0Val) + return nil + }, 1, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to desktop.Canvas: context fn SetOnKeyDown: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["on-key-up"] + if !ok { + return nil, errors.New("context to desktop.Canvas: expected context to have function OnKeyUp") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to desktop.Canvas: context fn OnKeyUp: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_OnKeyUp = func(ctx env.RyeCtx) func(*fyne.KeyEvent) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res func(*fyne.KeyEvent) + switch fn := ps.Res.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Canvas: arg 0: callback result: "+"expected 1 function arguments, but got "+strconv.Itoa(fn.Argsn), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = func(farg0 *fyne.KeyEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.KeyEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Canvas: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(fn.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Canvas: arg 0: callback result: "+"expected function or nil, but got "+objectDebugString(ps.Idx, fn), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to desktop.Canvas: context fn OnKeyUp: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["set-on-key-up"] + if !ok { + return nil, errors.New("context to desktop.Canvas: expected context to have function SetOnKeyUp") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to desktop.Canvas: context fn SetOnKeyUp: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetOnKeyUp = func(ctx env.RyeCtx, farg0 func(*fyne.KeyEvent)) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.KeyEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("context to desktop.Canvas: arg 1: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("context to desktop.Canvas: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("context to desktop.Canvas: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + farg0(arg0Val) + return nil + }, 1, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to desktop.Canvas: context fn SetOnKeyUp: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_desktop_Cursor struct { + self env.RyeCtx + fn_Image func(self env.RyeCtx) (image.Image, int, int) +} + +func (self *iface_desktop_Cursor) Image() (image.Image, int, int) { + return self.fn_Image(self.self) +} + +func ctxTo_desktop_Cursor(ps *env.ProgramState, v env.RyeCtx) (desktop.Cursor, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_desktop_Cursor{ + self: v, + } + ctxObj0, ok := wordToObj["image"] + if !ok { + return nil, errors.New("context to desktop.Cursor: expected context to have function Image") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to desktop.Cursor: context fn Image: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Image = func(ctx env.RyeCtx) (image.Image, int, int) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 image.Image + var res1 int + var res2 int + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Cursor: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if len(res.Series.S) != 3 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Cursor: arg 0: callback result: "+"expected block with 3 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(image.Image); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Cursor: arg 0: callback result: "+"expected native of type image.Image, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Cursor: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if vc, ok := res.Series.S[1].(env.Integer); ok { + res1 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Cursor: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + if vc, ok := res.Series.S[2].(env.Integer); ok { + res2 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Cursor: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[2]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1, res2 + } + return res0, res1, res2 + } + default: + return nil, errors.New("context to desktop.Cursor: context fn Image: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_desktop_Cursorable struct { + self env.RyeCtx + fn_Cursor func(self env.RyeCtx) desktop.Cursor +} + +func (self *iface_desktop_Cursorable) Cursor() desktop.Cursor { + return self.fn_Cursor(self.self) +} + +func ctxTo_desktop_Cursorable(ps *env.ProgramState, v env.RyeCtx) (desktop.Cursorable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_desktop_Cursorable{ + self: v, + } + ctxObj0, ok := wordToObj["cursor"] + if !ok { + return nil, errors.New("context to desktop.Cursorable: expected context to have function Cursor") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to desktop.Cursorable: context fn Cursor: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Cursor = func(ctx env.RyeCtx) desktop.Cursor { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res desktop.Cursor + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_desktop_Cursor(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Cursorable: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(desktop.Cursor); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Cursorable: arg 0: callback result: "+"expected native of type desktop.Cursor, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Cursorable: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Cursorable: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to desktop.Cursorable: context fn Cursor: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_desktop_Driver struct { + self env.RyeCtx + fn_CreateSplashWindow func(self env.RyeCtx) fyne.Window + fn_CurrentKeyModifiers func(self env.RyeCtx) fyne.KeyModifier +} + +func (self *iface_desktop_Driver) CreateSplashWindow() fyne.Window { + return self.fn_CreateSplashWindow(self.self) +} + +func (self *iface_desktop_Driver) CurrentKeyModifiers() fyne.KeyModifier { + return self.fn_CurrentKeyModifiers(self.self) +} + +func ctxTo_desktop_Driver(ps *env.ProgramState, v env.RyeCtx) (desktop.Driver, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_desktop_Driver{ + self: v, + } + ctxObj0, ok := wordToObj["create-splash-window"] + if !ok { + return nil, errors.New("context to desktop.Driver: expected context to have function CreateSplashWindow") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to desktop.Driver: context fn CreateSplashWindow: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CreateSplashWindow = func(ctx env.RyeCtx) fyne.Window { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Window + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Driver: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Driver: arg 0: callback result: "+"expected native of type fyne.Window, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Driver: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Driver: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to desktop.Driver: context fn CreateSplashWindow: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["current-key-modifiers"] + if !ok { + return nil, errors.New("context to desktop.Driver: expected context to have function CurrentKeyModifiers") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to desktop.Driver: context fn CurrentKeyModifiers: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CurrentKeyModifiers = func(ctx env.RyeCtx) fyne.KeyModifier { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.KeyModifier + { + nat, natOk := ps.Res.(env.Native) + var natValOk bool + var natVal fyne.KeyModifier + if natOk { + natVal, natValOk = nat.Value.(fyne.KeyModifier) + } + if natValOk { + res = natVal + } else { + var u int + if vc, ok := ps.Res.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to desktop.Driver: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = fyne.KeyModifier(u) + } + } + return res + } + default: + return nil, errors.New("context to desktop.Driver: context fn CurrentKeyModifiers: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_desktop_Hoverable struct { + self env.RyeCtx + fn_MouseIn func(self env.RyeCtx, arg0 *desktop.MouseEvent) + fn_MouseMoved func(self env.RyeCtx, arg0 *desktop.MouseEvent) + fn_MouseOut func(self env.RyeCtx) +} + +func (self *iface_desktop_Hoverable) MouseIn(arg0 *desktop.MouseEvent) { + self.fn_MouseIn(self.self, arg0) +} + +func (self *iface_desktop_Hoverable) MouseMoved(arg0 *desktop.MouseEvent) { + self.fn_MouseMoved(self.self, arg0) +} + +func (self *iface_desktop_Hoverable) MouseOut() { + self.fn_MouseOut(self.self) +} + +func ctxTo_desktop_Hoverable(ps *env.ProgramState, v env.RyeCtx) (desktop.Hoverable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_desktop_Hoverable{ + self: v, + } + ctxObj0, ok := wordToObj["mouse-in"] + if !ok { + return nil, errors.New("context to desktop.Hoverable: expected context to have function MouseIn") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to desktop.Hoverable: context fn MouseIn: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_MouseIn = func(ctx env.RyeCtx, farg0 *desktop.MouseEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*desktop.MouseEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to desktop.Hoverable: context fn MouseIn: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["mouse-moved"] + if !ok { + return nil, errors.New("context to desktop.Hoverable: expected context to have function MouseMoved") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to desktop.Hoverable: context fn MouseMoved: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_MouseMoved = func(ctx env.RyeCtx, farg0 *desktop.MouseEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*desktop.MouseEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to desktop.Hoverable: context fn MouseMoved: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["mouse-out"] + if !ok { + return nil, errors.New("context to desktop.Hoverable: expected context to have function MouseOut") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to desktop.Hoverable: context fn MouseOut: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_MouseOut = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to desktop.Hoverable: context fn MouseOut: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_desktop_Keyable struct { + self env.RyeCtx + fn_KeyDown func(self env.RyeCtx, arg0 *fyne.KeyEvent) + fn_KeyUp func(self env.RyeCtx, arg0 *fyne.KeyEvent) + fn_FocusGained func(self env.RyeCtx) + fn_FocusLost func(self env.RyeCtx) + fn_TypedRune func(self env.RyeCtx, arg0 rune) + fn_TypedKey func(self env.RyeCtx, arg0 *fyne.KeyEvent) +} + +func (self *iface_desktop_Keyable) KeyDown(arg0 *fyne.KeyEvent) { + self.fn_KeyDown(self.self, arg0) +} + +func (self *iface_desktop_Keyable) KeyUp(arg0 *fyne.KeyEvent) { + self.fn_KeyUp(self.self, arg0) +} + +func (self *iface_desktop_Keyable) FocusGained() { + self.fn_FocusGained(self.self) +} + +func (self *iface_desktop_Keyable) FocusLost() { + self.fn_FocusLost(self.self) +} + +func (self *iface_desktop_Keyable) TypedRune(arg0 rune) { + self.fn_TypedRune(self.self, arg0) +} + +func (self *iface_desktop_Keyable) TypedKey(arg0 *fyne.KeyEvent) { + self.fn_TypedKey(self.self, arg0) +} + +func ctxTo_desktop_Keyable(ps *env.ProgramState, v env.RyeCtx) (desktop.Keyable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_desktop_Keyable{ + self: v, + } + ctxObj0, ok := wordToObj["key-down"] + if !ok { + return nil, errors.New("context to desktop.Keyable: expected context to have function KeyDown") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to desktop.Keyable: context fn KeyDown: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_KeyDown = func(ctx env.RyeCtx, farg0 *fyne.KeyEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.KeyEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to desktop.Keyable: context fn KeyDown: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["key-up"] + if !ok { + return nil, errors.New("context to desktop.Keyable: expected context to have function KeyUp") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to desktop.Keyable: context fn KeyUp: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_KeyUp = func(ctx env.RyeCtx, farg0 *fyne.KeyEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.KeyEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to desktop.Keyable: context fn KeyUp: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["focus-gained"] + if !ok { + return nil, errors.New("context to desktop.Keyable: expected context to have function FocusGained") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to desktop.Keyable: context fn FocusGained: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FocusGained = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to desktop.Keyable: context fn FocusGained: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["focus-lost"] + if !ok { + return nil, errors.New("context to desktop.Keyable: expected context to have function FocusLost") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to desktop.Keyable: context fn FocusLost: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FocusLost = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to desktop.Keyable: context fn FocusLost: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["typed-rune"] + if !ok { + return nil, errors.New("context to desktop.Keyable: expected context to have function TypedRune") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to desktop.Keyable: context fn TypedRune: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TypedRune = func(ctx env.RyeCtx, farg0 rune) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to desktop.Keyable: context fn TypedRune: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["typed-key"] + if !ok { + return nil, errors.New("context to desktop.Keyable: expected context to have function TypedKey") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to desktop.Keyable: context fn TypedKey: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TypedKey = func(ctx env.RyeCtx, farg0 *fyne.KeyEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.KeyEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to desktop.Keyable: context fn TypedKey: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_desktop_Mouseable struct { + self env.RyeCtx + fn_MouseDown func(self env.RyeCtx, arg0 *desktop.MouseEvent) + fn_MouseUp func(self env.RyeCtx, arg0 *desktop.MouseEvent) +} + +func (self *iface_desktop_Mouseable) MouseDown(arg0 *desktop.MouseEvent) { + self.fn_MouseDown(self.self, arg0) +} + +func (self *iface_desktop_Mouseable) MouseUp(arg0 *desktop.MouseEvent) { + self.fn_MouseUp(self.self, arg0) +} + +func ctxTo_desktop_Mouseable(ps *env.ProgramState, v env.RyeCtx) (desktop.Mouseable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_desktop_Mouseable{ + self: v, + } + ctxObj0, ok := wordToObj["mouse-down"] + if !ok { + return nil, errors.New("context to desktop.Mouseable: expected context to have function MouseDown") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to desktop.Mouseable: context fn MouseDown: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_MouseDown = func(ctx env.RyeCtx, farg0 *desktop.MouseEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*desktop.MouseEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to desktop.Mouseable: context fn MouseDown: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["mouse-up"] + if !ok { + return nil, errors.New("context to desktop.Mouseable: expected context to have function MouseUp") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to desktop.Mouseable: context fn MouseUp: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_MouseUp = func(ctx env.RyeCtx, farg0 *desktop.MouseEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*desktop.MouseEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to desktop.Mouseable: context fn MouseUp: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_dialog_Dialog struct { + self env.RyeCtx + fn_Show func(self env.RyeCtx) + fn_Hide func(self env.RyeCtx) + fn_SetDismissText func(self env.RyeCtx, arg0 string) + fn_SetOnClosed func(self env.RyeCtx, arg0 func()) + fn_Refresh func(self env.RyeCtx) + fn_Resize func(self env.RyeCtx, arg0 fyne.Size) + fn_MinSize func(self env.RyeCtx) fyne.Size +} + +func (self *iface_dialog_Dialog) Show() { + self.fn_Show(self.self) +} + +func (self *iface_dialog_Dialog) Hide() { + self.fn_Hide(self.self) +} + +func (self *iface_dialog_Dialog) SetDismissText(arg0 string) { + self.fn_SetDismissText(self.self, arg0) +} + +func (self *iface_dialog_Dialog) SetOnClosed(arg0 func()) { + self.fn_SetOnClosed(self.self, arg0) +} + +func (self *iface_dialog_Dialog) Refresh() { + self.fn_Refresh(self.self) +} + +func (self *iface_dialog_Dialog) Resize(arg0 fyne.Size) { + self.fn_Resize(self.self, arg0) +} + +func (self *iface_dialog_Dialog) MinSize() fyne.Size { + return self.fn_MinSize(self.self) +} + +func ctxTo_dialog_Dialog(ps *env.ProgramState, v env.RyeCtx) (dialog.Dialog, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_dialog_Dialog{ + self: v, + } + ctxObj0, ok := wordToObj["show"] + if !ok { + return nil, errors.New("context to dialog.Dialog: expected context to have function Show") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to dialog.Dialog: context fn Show: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Show = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to dialog.Dialog: context fn Show: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["hide"] + if !ok { + return nil, errors.New("context to dialog.Dialog: expected context to have function Hide") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to dialog.Dialog: context fn Hide: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Hide = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to dialog.Dialog: context fn Hide: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["set-dismiss-text"] + if !ok { + return nil, errors.New("context to dialog.Dialog: expected context to have function SetDismissText") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to dialog.Dialog: context fn SetDismissText: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetDismissText = func(ctx env.RyeCtx, farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to dialog.Dialog: context fn SetDismissText: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["set-on-closed"] + if !ok { + return nil, errors.New("context to dialog.Dialog: expected context to have function SetOnClosed") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to dialog.Dialog: context fn SetOnClosed: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetOnClosed = func(ctx env.RyeCtx, farg0 func()) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + farg0() + return nil + }, 0, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to dialog.Dialog: context fn SetOnClosed: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["refresh"] + if !ok { + return nil, errors.New("context to dialog.Dialog: expected context to have function Refresh") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to dialog.Dialog: context fn Refresh: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Refresh = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to dialog.Dialog: context fn Refresh: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["resize"] + if !ok { + return nil, errors.New("context to dialog.Dialog: expected context to have function Resize") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to dialog.Dialog: context fn Resize: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Resize = func(ctx env.RyeCtx, farg0 fyne.Size) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*fyne.Size)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to dialog.Dialog: context fn Resize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["min-size"] + if !ok { + return nil, errors.New("context to dialog.Dialog: expected context to have function MinSize") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to dialog.Dialog: context fn MinSize: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_MinSize = func(ctx env.RyeCtx) fyne.Size { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Size + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + res = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to dialog.Dialog: arg 0: callback result: "+"expected native of type *fyne.Size, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to dialog.Dialog: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to dialog.Dialog: context fn MinSize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_App struct { + self env.RyeCtx + fn_NewWindow func(self env.RyeCtx, arg0 string) fyne.Window + fn_OpenURL func(self env.RyeCtx, arg0 *url.URL) error + fn_Icon func(self env.RyeCtx) fyne.Resource + fn_SetIcon func(self env.RyeCtx, arg0 fyne.Resource) + fn_Run func(self env.RyeCtx) + fn_Quit func(self env.RyeCtx) + fn_Driver func(self env.RyeCtx) fyne.Driver + fn_UniqueID func(self env.RyeCtx) string + fn_SendNotification func(self env.RyeCtx, arg0 *fyne.Notification) + fn_Settings func(self env.RyeCtx) fyne.Settings + fn_Preferences func(self env.RyeCtx) fyne.Preferences + fn_Storage func(self env.RyeCtx) fyne.Storage + fn_Lifecycle func(self env.RyeCtx) fyne.Lifecycle + fn_Metadata func(self env.RyeCtx) fyne.AppMetadata + fn_CloudProvider func(self env.RyeCtx) fyne.CloudProvider + fn_SetCloudProvider func(self env.RyeCtx, arg0 fyne.CloudProvider) +} + +func (self *iface_fyne_App) NewWindow(arg0 string) fyne.Window { + return self.fn_NewWindow(self.self, arg0) +} + +func (self *iface_fyne_App) OpenURL(arg0 *url.URL) error { + return self.fn_OpenURL(self.self, arg0) +} + +func (self *iface_fyne_App) Icon() fyne.Resource { + return self.fn_Icon(self.self) +} + +func (self *iface_fyne_App) SetIcon(arg0 fyne.Resource) { + self.fn_SetIcon(self.self, arg0) +} + +func (self *iface_fyne_App) Run() { + self.fn_Run(self.self) +} + +func (self *iface_fyne_App) Quit() { + self.fn_Quit(self.self) +} + +func (self *iface_fyne_App) Driver() fyne.Driver { + return self.fn_Driver(self.self) +} + +func (self *iface_fyne_App) UniqueID() string { + return self.fn_UniqueID(self.self) +} + +func (self *iface_fyne_App) SendNotification(arg0 *fyne.Notification) { + self.fn_SendNotification(self.self, arg0) +} + +func (self *iface_fyne_App) Settings() fyne.Settings { + return self.fn_Settings(self.self) +} + +func (self *iface_fyne_App) Preferences() fyne.Preferences { + return self.fn_Preferences(self.self) +} + +func (self *iface_fyne_App) Storage() fyne.Storage { + return self.fn_Storage(self.self) +} + +func (self *iface_fyne_App) Lifecycle() fyne.Lifecycle { + return self.fn_Lifecycle(self.self) +} + +func (self *iface_fyne_App) Metadata() fyne.AppMetadata { + return self.fn_Metadata(self.self) +} + +func (self *iface_fyne_App) CloudProvider() fyne.CloudProvider { + return self.fn_CloudProvider(self.self) +} + +func (self *iface_fyne_App) SetCloudProvider(arg0 fyne.CloudProvider) { + self.fn_SetCloudProvider(self.self, arg0) +} + +func ctxTo_fyne_App(ps *env.ProgramState, v env.RyeCtx) (fyne.App, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_App{ + self: v, + } + ctxObj0, ok := wordToObj["new-window"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function NewWindow") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.App: context fn NewWindow: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_NewWindow = func(ctx env.RyeCtx, farg0 string) fyne.Window { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res fyne.Window + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native of type fyne.Window, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.App: context fn NewWindow: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["open-url"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function OpenURL") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.App: context fn OpenURL: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_OpenURL = func(ctx env.RyeCtx, farg0 *url.URL) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*url.URL)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.App: context fn OpenURL: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["icon"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function Icon") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.App: context fn Icon: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Icon = func(ctx env.RyeCtx) fyne.Resource { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Resource + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native of type fyne.Resource, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.App: context fn Icon: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["set-icon"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function SetIcon") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.App: context fn SetIcon: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetIcon = func(ctx env.RyeCtx, farg0 fyne.Resource) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Resource)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.App: context fn SetIcon: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["run"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function Run") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.App: context fn Run: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Run = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.App: context fn Run: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["quit"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function Quit") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.App: context fn Quit: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Quit = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.App: context fn Quit: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["driver"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function Driver") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.App: context fn Driver: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Driver = func(ctx env.RyeCtx) fyne.Driver { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Driver + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Driver); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native of type fyne.Driver, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.App: context fn Driver: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["unique-id"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function UniqueID") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.App: context fn UniqueID: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_UniqueID = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.App: context fn UniqueID: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["send-notification"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function SendNotification") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.App: context fn SendNotification: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SendNotification = func(ctx env.RyeCtx, farg0 *fyne.Notification) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.Notification)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.App: context fn SendNotification: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["settings"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function Settings") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.App: context fn Settings: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Settings = func(ctx env.RyeCtx) fyne.Settings { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Settings + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Settings(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Settings); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native of type fyne.Settings, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.App: context fn Settings: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["preferences"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function Preferences") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.App: context fn Preferences: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Preferences = func(ctx env.RyeCtx) fyne.Preferences { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Preferences + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native of type fyne.Preferences, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.App: context fn Preferences: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["storage"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function Storage") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.App: context fn Storage: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Storage = func(ctx env.RyeCtx) fyne.Storage { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Storage + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Storage(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Storage); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native of type fyne.Storage, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.App: context fn Storage: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj12, ok := wordToObj["lifecycle"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function Lifecycle") + } + switch fn := ctxObj12.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.App: context fn Lifecycle: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Lifecycle = func(ctx env.RyeCtx) fyne.Lifecycle { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Lifecycle + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Lifecycle(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Lifecycle); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native of type fyne.Lifecycle, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.App: context fn Lifecycle: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj13, ok := wordToObj["metadata"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function Metadata") + } + switch fn := ctxObj13.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.App: context fn Metadata: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Metadata = func(ctx env.RyeCtx) fyne.AppMetadata { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.AppMetadata + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + res = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native of type *fyne.AppMetadata, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.App: context fn Metadata: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj14, ok := wordToObj["cloud-provider"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function CloudProvider") + } + switch fn := ctxObj14.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.App: context fn CloudProvider: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CloudProvider = func(ctx env.RyeCtx) fyne.CloudProvider { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CloudProvider + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CloudProvider(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CloudProvider); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native of type fyne.CloudProvider, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.App: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.App: context fn CloudProvider: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj15, ok := wordToObj["set-cloud-provider"] + if !ok { + return nil, errors.New("context to fyne.App: expected context to have function SetCloudProvider") + } + switch fn := ctxObj15.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.App: context fn SetCloudProvider: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetCloudProvider = func(ctx env.RyeCtx, farg0 fyne.CloudProvider) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.CloudProvider)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.App: context fn SetCloudProvider: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Canvas struct { + self env.RyeCtx + fn_Content func(self env.RyeCtx) fyne.CanvasObject + fn_SetContent func(self env.RyeCtx, arg0 fyne.CanvasObject) + fn_Refresh func(self env.RyeCtx, arg0 fyne.CanvasObject) + fn_Focus func(self env.RyeCtx, arg0 fyne.Focusable) + fn_FocusNext func(self env.RyeCtx) + fn_FocusPrevious func(self env.RyeCtx) + fn_Unfocus func(self env.RyeCtx) + fn_Focused func(self env.RyeCtx) fyne.Focusable + fn_Size func(self env.RyeCtx) fyne.Size + fn_Scale func(self env.RyeCtx) float32 + fn_Overlays func(self env.RyeCtx) fyne.OverlayStack + fn_OnTypedRune func(self env.RyeCtx) func(rune) + fn_SetOnTypedRune func(self env.RyeCtx, arg0 func(rune)) + fn_OnTypedKey func(self env.RyeCtx) func(*fyne.KeyEvent) + fn_SetOnTypedKey func(self env.RyeCtx, arg0 func(*fyne.KeyEvent)) + fn_AddShortcut func(self env.RyeCtx, arg0 fyne.Shortcut, arg1 func(fyne.Shortcut)) + fn_RemoveShortcut func(self env.RyeCtx, arg0 fyne.Shortcut) + fn_Capture func(self env.RyeCtx) image.Image + fn_PixelCoordinateForPosition func(self env.RyeCtx, arg0 fyne.Position) (int, int) + fn_InteractiveArea func(self env.RyeCtx) (fyne.Position, fyne.Size) +} + +func (self *iface_fyne_Canvas) Content() fyne.CanvasObject { + return self.fn_Content(self.self) +} + +func (self *iface_fyne_Canvas) SetContent(arg0 fyne.CanvasObject) { + self.fn_SetContent(self.self, arg0) +} + +func (self *iface_fyne_Canvas) Refresh(arg0 fyne.CanvasObject) { + self.fn_Refresh(self.self, arg0) +} + +func (self *iface_fyne_Canvas) Focus(arg0 fyne.Focusable) { + self.fn_Focus(self.self, arg0) +} + +func (self *iface_fyne_Canvas) FocusNext() { + self.fn_FocusNext(self.self) +} + +func (self *iface_fyne_Canvas) FocusPrevious() { + self.fn_FocusPrevious(self.self) +} + +func (self *iface_fyne_Canvas) Unfocus() { + self.fn_Unfocus(self.self) +} + +func (self *iface_fyne_Canvas) Focused() fyne.Focusable { + return self.fn_Focused(self.self) +} + +func (self *iface_fyne_Canvas) Size() fyne.Size { + return self.fn_Size(self.self) +} + +func (self *iface_fyne_Canvas) Scale() float32 { + return self.fn_Scale(self.self) +} + +func (self *iface_fyne_Canvas) Overlays() fyne.OverlayStack { + return self.fn_Overlays(self.self) +} + +func (self *iface_fyne_Canvas) OnTypedRune() func(rune) { + return self.fn_OnTypedRune(self.self) +} + +func (self *iface_fyne_Canvas) SetOnTypedRune(arg0 func(rune)) { + self.fn_SetOnTypedRune(self.self, arg0) +} + +func (self *iface_fyne_Canvas) OnTypedKey() func(*fyne.KeyEvent) { + return self.fn_OnTypedKey(self.self) +} + +func (self *iface_fyne_Canvas) SetOnTypedKey(arg0 func(*fyne.KeyEvent)) { + self.fn_SetOnTypedKey(self.self, arg0) +} + +func (self *iface_fyne_Canvas) AddShortcut(arg0 fyne.Shortcut, arg1 func(fyne.Shortcut)) { + self.fn_AddShortcut(self.self, arg0, arg1) +} + +func (self *iface_fyne_Canvas) RemoveShortcut(arg0 fyne.Shortcut) { + self.fn_RemoveShortcut(self.self, arg0) +} + +func (self *iface_fyne_Canvas) Capture() image.Image { + return self.fn_Capture(self.self) +} + +func (self *iface_fyne_Canvas) PixelCoordinateForPosition(arg0 fyne.Position) (int, int) { + return self.fn_PixelCoordinateForPosition(self.self, arg0) +} + +func (self *iface_fyne_Canvas) InteractiveArea() (fyne.Position, fyne.Size) { + return self.fn_InteractiveArea(self.self) +} + +func ctxTo_fyne_Canvas(ps *env.ProgramState, v env.RyeCtx) (fyne.Canvas, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Canvas{ + self: v, + } + ctxObj0, ok := wordToObj["content"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function Content") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Canvas: context fn Content: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Content = func(ctx env.RyeCtx) fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Canvas: context fn Content: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set-content"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function SetContent") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Canvas: context fn SetContent: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetContent = func(ctx env.RyeCtx, farg0 fyne.CanvasObject) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Canvas: context fn SetContent: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["refresh"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function Refresh") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Canvas: context fn Refresh: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Refresh = func(ctx env.RyeCtx, farg0 fyne.CanvasObject) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Canvas: context fn Refresh: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["focus"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function Focus") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Canvas: context fn Focus: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Focus = func(ctx env.RyeCtx, farg0 fyne.Focusable) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Focusable)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Canvas: context fn Focus: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["focus-next"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function FocusNext") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Canvas: context fn FocusNext: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FocusNext = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Canvas: context fn FocusNext: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["focus-previous"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function FocusPrevious") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Canvas: context fn FocusPrevious: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FocusPrevious = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Canvas: context fn FocusPrevious: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["unfocus"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function Unfocus") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Canvas: context fn Unfocus: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Unfocus = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Canvas: context fn Unfocus: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["focused"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function Focused") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Canvas: context fn Focused: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Focused = func(ctx env.RyeCtx) fyne.Focusable { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Focusable + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Focusable(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Focusable); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected native of type fyne.Focusable, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Canvas: context fn Focused: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["size"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function Size") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Canvas: context fn Size: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Size = func(ctx env.RyeCtx) fyne.Size { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Size + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + res = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected native of type *fyne.Size, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Canvas: context fn Size: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["scale"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function Scale") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Canvas: context fn Scale: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Scale = func(ctx env.RyeCtx) float32 { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res float32 + if vc, ok := ps.Res.(env.Decimal); ok { + res = float32(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Canvas: context fn Scale: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["overlays"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function Overlays") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Canvas: context fn Overlays: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Overlays = func(ctx env.RyeCtx) fyne.OverlayStack { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.OverlayStack + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_OverlayStack(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.OverlayStack); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected native of type fyne.OverlayStack, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Canvas: context fn Overlays: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["on-typed-rune"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function OnTypedRune") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Canvas: context fn OnTypedRune: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_OnTypedRune = func(ctx env.RyeCtx) func(rune) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res func(rune) + switch fn := ps.Res.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected 1 function arguments, but got "+strconv.Itoa(fn.Argsn), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = func(farg0 rune) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(fn.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected function or nil, but got "+objectDebugString(ps.Idx, fn), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Canvas: context fn OnTypedRune: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj12, ok := wordToObj["set-on-typed-rune"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function SetOnTypedRune") + } + switch fn := ctxObj12.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Canvas: context fn SetOnTypedRune: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetOnTypedRune = func(ctx env.RyeCtx, farg0 func(rune)) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val rune + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("context to fyne.Canvas: arg 1: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("context to fyne.Canvas: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + farg0(arg0Val) + return nil + }, 1, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Canvas: context fn SetOnTypedRune: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj13, ok := wordToObj["on-typed-key"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function OnTypedKey") + } + switch fn := ctxObj13.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Canvas: context fn OnTypedKey: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_OnTypedKey = func(ctx env.RyeCtx) func(*fyne.KeyEvent) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res func(*fyne.KeyEvent) + switch fn := ps.Res.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected 1 function arguments, but got "+strconv.Itoa(fn.Argsn), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = func(farg0 *fyne.KeyEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.KeyEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(fn.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected function or nil, but got "+objectDebugString(ps.Idx, fn), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Canvas: context fn OnTypedKey: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj14, ok := wordToObj["set-on-typed-key"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function SetOnTypedKey") + } + switch fn := ctxObj14.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Canvas: context fn SetOnTypedKey: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetOnTypedKey = func(ctx env.RyeCtx, farg0 func(*fyne.KeyEvent)) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.KeyEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("context to fyne.Canvas: arg 1: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("context to fyne.Canvas: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("context to fyne.Canvas: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + farg0(arg0Val) + return nil + }, 1, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Canvas: context fn SetOnTypedKey: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj15, ok := wordToObj["add-shortcut"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function AddShortcut") + } + switch fn := ctxObj15.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Canvas: context fn AddShortcut: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddShortcut = func(ctx env.RyeCtx, farg0 fyne.Shortcut, farg1 func(fyne.Shortcut)) { + var farg0Val, farg1Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Shortcut)") + farg1Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Shortcut + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Shortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("context to fyne.Canvas: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Shortcut); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("context to fyne.Canvas: arg 1: " + "expected native of type fyne.Shortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("context to fyne.Canvas: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("context to fyne.Canvas: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + farg1(arg0Val) + return nil + }, 1, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + default: + return nil, errors.New("context to fyne.Canvas: context fn AddShortcut: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj16, ok := wordToObj["remove-shortcut"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function RemoveShortcut") + } + switch fn := ctxObj16.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Canvas: context fn RemoveShortcut: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveShortcut = func(ctx env.RyeCtx, farg0 fyne.Shortcut) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Shortcut)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Canvas: context fn RemoveShortcut: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj17, ok := wordToObj["capture"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function Capture") + } + switch fn := ctxObj17.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Canvas: context fn Capture: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Capture = func(ctx env.RyeCtx) image.Image { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res image.Image + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(image.Image); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected native of type image.Image, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Canvas: context fn Capture: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj18, ok := wordToObj["pixel-coordinate-for-position"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function PixelCoordinateForPosition") + } + switch fn := ctxObj18.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Canvas: context fn PixelCoordinateForPosition: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_PixelCoordinateForPosition = func(ctx env.RyeCtx, farg0 fyne.Position) (int, int) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*fyne.Position)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 int + var res1 int + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[1].(env.Integer); ok { + res1 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to fyne.Canvas: context fn PixelCoordinateForPosition: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj19, ok := wordToObj["interactive-area"] + if !ok { + return nil, errors.New("context to fyne.Canvas: expected context to have function InteractiveArea") + } + switch fn := ctxObj19.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Canvas: context fn InteractiveArea: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_InteractiveArea = func(ctx env.RyeCtx) (fyne.Position, fyne.Size) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 fyne.Position + var res1 fyne.Size + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + res0 = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected native of type *fyne.Position, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + res1 = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected native of type *fyne.Size, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Canvas: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to fyne.Canvas: context fn InteractiveArea: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_CanvasObject struct { + self env.RyeCtx + fn_MinSize func(self env.RyeCtx) fyne.Size + fn_Move func(self env.RyeCtx, arg0 fyne.Position) + fn_Position func(self env.RyeCtx) fyne.Position + fn_Resize func(self env.RyeCtx, arg0 fyne.Size) + fn_Size func(self env.RyeCtx) fyne.Size + fn_Hide func(self env.RyeCtx) + fn_Visible func(self env.RyeCtx) bool + fn_Show func(self env.RyeCtx) + fn_Refresh func(self env.RyeCtx) +} + +func (self *iface_fyne_CanvasObject) MinSize() fyne.Size { + return self.fn_MinSize(self.self) +} + +func (self *iface_fyne_CanvasObject) Move(arg0 fyne.Position) { + self.fn_Move(self.self, arg0) +} + +func (self *iface_fyne_CanvasObject) Position() fyne.Position { + return self.fn_Position(self.self) +} + +func (self *iface_fyne_CanvasObject) Resize(arg0 fyne.Size) { + self.fn_Resize(self.self, arg0) +} + +func (self *iface_fyne_CanvasObject) Size() fyne.Size { + return self.fn_Size(self.self) +} + +func (self *iface_fyne_CanvasObject) Hide() { + self.fn_Hide(self.self) +} + +func (self *iface_fyne_CanvasObject) Visible() bool { + return self.fn_Visible(self.self) +} + +func (self *iface_fyne_CanvasObject) Show() { + self.fn_Show(self.self) +} + +func (self *iface_fyne_CanvasObject) Refresh() { + self.fn_Refresh(self.self) +} + +func ctxTo_fyne_CanvasObject(ps *env.ProgramState, v env.RyeCtx) (fyne.CanvasObject, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_CanvasObject{ + self: v, + } + ctxObj0, ok := wordToObj["min-size"] + if !ok { + return nil, errors.New("context to fyne.CanvasObject: expected context to have function MinSize") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.CanvasObject: context fn MinSize: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_MinSize = func(ctx env.RyeCtx) fyne.Size { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Size + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + res = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CanvasObject: arg 0: callback result: "+"expected native of type *fyne.Size, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CanvasObject: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.CanvasObject: context fn MinSize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["move"] + if !ok { + return nil, errors.New("context to fyne.CanvasObject: expected context to have function Move") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.CanvasObject: context fn Move: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Move = func(ctx env.RyeCtx, farg0 fyne.Position) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*fyne.Position)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.CanvasObject: context fn Move: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["position"] + if !ok { + return nil, errors.New("context to fyne.CanvasObject: expected context to have function Position") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.CanvasObject: context fn Position: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Position = func(ctx env.RyeCtx) fyne.Position { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Position + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + res = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CanvasObject: arg 0: callback result: "+"expected native of type *fyne.Position, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CanvasObject: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.CanvasObject: context fn Position: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["resize"] + if !ok { + return nil, errors.New("context to fyne.CanvasObject: expected context to have function Resize") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.CanvasObject: context fn Resize: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Resize = func(ctx env.RyeCtx, farg0 fyne.Size) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*fyne.Size)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.CanvasObject: context fn Resize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["size"] + if !ok { + return nil, errors.New("context to fyne.CanvasObject: expected context to have function Size") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.CanvasObject: context fn Size: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Size = func(ctx env.RyeCtx) fyne.Size { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Size + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + res = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CanvasObject: arg 0: callback result: "+"expected native of type *fyne.Size, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CanvasObject: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.CanvasObject: context fn Size: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["hide"] + if !ok { + return nil, errors.New("context to fyne.CanvasObject: expected context to have function Hide") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.CanvasObject: context fn Hide: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Hide = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.CanvasObject: context fn Hide: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["visible"] + if !ok { + return nil, errors.New("context to fyne.CanvasObject: expected context to have function Visible") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.CanvasObject: context fn Visible: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Visible = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CanvasObject: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.CanvasObject: context fn Visible: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["show"] + if !ok { + return nil, errors.New("context to fyne.CanvasObject: expected context to have function Show") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.CanvasObject: context fn Show: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Show = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.CanvasObject: context fn Show: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["refresh"] + if !ok { + return nil, errors.New("context to fyne.CanvasObject: expected context to have function Refresh") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.CanvasObject: context fn Refresh: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Refresh = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.CanvasObject: context fn Refresh: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Clipboard struct { + self env.RyeCtx + fn_Content func(self env.RyeCtx) string + fn_SetContent func(self env.RyeCtx, arg0 string) +} + +func (self *iface_fyne_Clipboard) Content() string { + return self.fn_Content(self.self) +} + +func (self *iface_fyne_Clipboard) SetContent(arg0 string) { + self.fn_SetContent(self.self, arg0) +} + +func ctxTo_fyne_Clipboard(ps *env.ProgramState, v env.RyeCtx) (fyne.Clipboard, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Clipboard{ + self: v, + } + ctxObj0, ok := wordToObj["content"] + if !ok { + return nil, errors.New("context to fyne.Clipboard: expected context to have function Content") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Clipboard: context fn Content: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Content = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Clipboard: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Clipboard: context fn Content: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set-content"] + if !ok { + return nil, errors.New("context to fyne.Clipboard: expected context to have function SetContent") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Clipboard: context fn SetContent: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetContent = func(ctx env.RyeCtx, farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Clipboard: context fn SetContent: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_CloudProvider struct { + self env.RyeCtx + fn_ProviderDescription func(self env.RyeCtx) string + fn_ProviderIcon func(self env.RyeCtx) fyne.Resource + fn_ProviderName func(self env.RyeCtx) string + fn_Cleanup func(self env.RyeCtx, arg0 fyne.App) + fn_Setup func(self env.RyeCtx, arg0 fyne.App) error +} + +func (self *iface_fyne_CloudProvider) ProviderDescription() string { + return self.fn_ProviderDescription(self.self) +} + +func (self *iface_fyne_CloudProvider) ProviderIcon() fyne.Resource { + return self.fn_ProviderIcon(self.self) +} + +func (self *iface_fyne_CloudProvider) ProviderName() string { + return self.fn_ProviderName(self.self) +} + +func (self *iface_fyne_CloudProvider) Cleanup(arg0 fyne.App) { + self.fn_Cleanup(self.self, arg0) +} + +func (self *iface_fyne_CloudProvider) Setup(arg0 fyne.App) error { + return self.fn_Setup(self.self, arg0) +} + +func ctxTo_fyne_CloudProvider(ps *env.ProgramState, v env.RyeCtx) (fyne.CloudProvider, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_CloudProvider{ + self: v, + } + ctxObj0, ok := wordToObj["provider-description"] + if !ok { + return nil, errors.New("context to fyne.CloudProvider: expected context to have function ProviderDescription") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.CloudProvider: context fn ProviderDescription: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ProviderDescription = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProvider: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.CloudProvider: context fn ProviderDescription: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["provider-icon"] + if !ok { + return nil, errors.New("context to fyne.CloudProvider: expected context to have function ProviderIcon") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.CloudProvider: context fn ProviderIcon: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ProviderIcon = func(ctx env.RyeCtx) fyne.Resource { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Resource + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProvider: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProvider: arg 0: callback result: "+"expected native of type fyne.Resource, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProvider: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProvider: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.CloudProvider: context fn ProviderIcon: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["provider-name"] + if !ok { + return nil, errors.New("context to fyne.CloudProvider: expected context to have function ProviderName") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.CloudProvider: context fn ProviderName: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ProviderName = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProvider: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.CloudProvider: context fn ProviderName: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["cleanup"] + if !ok { + return nil, errors.New("context to fyne.CloudProvider: expected context to have function Cleanup") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.CloudProvider: context fn Cleanup: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Cleanup = func(ctx env.RyeCtx, farg0 fyne.App) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.App)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.CloudProvider: context fn Cleanup: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["setup"] + if !ok { + return nil, errors.New("context to fyne.CloudProvider: expected context to have function Setup") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.CloudProvider: context fn Setup: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Setup = func(ctx env.RyeCtx, farg0 fyne.App) error { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.App)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProvider: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProvider: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.CloudProvider: context fn Setup: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_CloudProviderPreferences struct { + self env.RyeCtx + fn_CloudPreferences func(self env.RyeCtx, arg0 fyne.App) fyne.Preferences +} + +func (self *iface_fyne_CloudProviderPreferences) CloudPreferences(arg0 fyne.App) fyne.Preferences { + return self.fn_CloudPreferences(self.self, arg0) +} + +func ctxTo_fyne_CloudProviderPreferences(ps *env.ProgramState, v env.RyeCtx) (fyne.CloudProviderPreferences, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_CloudProviderPreferences{ + self: v, + } + ctxObj0, ok := wordToObj["cloud-preferences"] + if !ok { + return nil, errors.New("context to fyne.CloudProviderPreferences: expected context to have function CloudPreferences") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.CloudProviderPreferences: context fn CloudPreferences: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CloudPreferences = func(ctx env.RyeCtx, farg0 fyne.App) fyne.Preferences { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.App)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res fyne.Preferences + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProviderPreferences: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProviderPreferences: arg 0: callback result: "+"expected native of type fyne.Preferences, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProviderPreferences: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProviderPreferences: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.CloudProviderPreferences: context fn CloudPreferences: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_CloudProviderStorage struct { + self env.RyeCtx + fn_CloudStorage func(self env.RyeCtx, arg0 fyne.App) fyne.Storage +} + +func (self *iface_fyne_CloudProviderStorage) CloudStorage(arg0 fyne.App) fyne.Storage { + return self.fn_CloudStorage(self.self, arg0) +} + +func ctxTo_fyne_CloudProviderStorage(ps *env.ProgramState, v env.RyeCtx) (fyne.CloudProviderStorage, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_CloudProviderStorage{ + self: v, + } + ctxObj0, ok := wordToObj["cloud-storage"] + if !ok { + return nil, errors.New("context to fyne.CloudProviderStorage: expected context to have function CloudStorage") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.CloudProviderStorage: context fn CloudStorage: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CloudStorage = func(ctx env.RyeCtx, farg0 fyne.App) fyne.Storage { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.App)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res fyne.Storage + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Storage(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProviderStorage: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Storage); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProviderStorage: arg 0: callback result: "+"expected native of type fyne.Storage, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProviderStorage: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.CloudProviderStorage: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.CloudProviderStorage: context fn CloudStorage: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Device struct { + self env.RyeCtx + fn_Orientation func(self env.RyeCtx) fyne.DeviceOrientation + fn_IsMobile func(self env.RyeCtx) bool + fn_IsBrowser func(self env.RyeCtx) bool + fn_HasKeyboard func(self env.RyeCtx) bool + fn_SystemScaleForWindow func(self env.RyeCtx, arg0 fyne.Window) float32 + fn_Locale func(self env.RyeCtx) fyne.Locale +} + +func (self *iface_fyne_Device) Orientation() fyne.DeviceOrientation { + return self.fn_Orientation(self.self) +} + +func (self *iface_fyne_Device) IsMobile() bool { + return self.fn_IsMobile(self.self) +} + +func (self *iface_fyne_Device) IsBrowser() bool { + return self.fn_IsBrowser(self.self) +} + +func (self *iface_fyne_Device) HasKeyboard() bool { + return self.fn_HasKeyboard(self.self) +} + +func (self *iface_fyne_Device) SystemScaleForWindow(arg0 fyne.Window) float32 { + return self.fn_SystemScaleForWindow(self.self, arg0) +} + +func (self *iface_fyne_Device) Locale() fyne.Locale { + return self.fn_Locale(self.self) +} + +func ctxTo_fyne_Device(ps *env.ProgramState, v env.RyeCtx) (fyne.Device, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Device{ + self: v, + } + ctxObj0, ok := wordToObj["orientation"] + if !ok { + return nil, errors.New("context to fyne.Device: expected context to have function Orientation") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Device: context fn Orientation: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Orientation = func(ctx env.RyeCtx) fyne.DeviceOrientation { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.DeviceOrientation + { + nat, natOk := ps.Res.(env.Native) + var natValOk bool + var natVal fyne.DeviceOrientation + if natOk { + natVal, natValOk = nat.Value.(fyne.DeviceOrientation) + } + if natValOk { + res = natVal + } else { + var u int + if vc, ok := ps.Res.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Device: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = fyne.DeviceOrientation(u) + } + } + return res + } + default: + return nil, errors.New("context to fyne.Device: context fn Orientation: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["is-mobile"] + if !ok { + return nil, errors.New("context to fyne.Device: expected context to have function IsMobile") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Device: context fn IsMobile: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_IsMobile = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Device: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Device: context fn IsMobile: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["is-browser"] + if !ok { + return nil, errors.New("context to fyne.Device: expected context to have function IsBrowser") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Device: context fn IsBrowser: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_IsBrowser = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Device: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Device: context fn IsBrowser: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["has-keyboard"] + if !ok { + return nil, errors.New("context to fyne.Device: expected context to have function HasKeyboard") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Device: context fn HasKeyboard: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_HasKeyboard = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Device: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Device: context fn HasKeyboard: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["system-scale-for-window"] + if !ok { + return nil, errors.New("context to fyne.Device: expected context to have function SystemScaleForWindow") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Device: context fn SystemScaleForWindow: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SystemScaleForWindow = func(ctx env.RyeCtx, farg0 fyne.Window) float32 { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Window)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res float32 + if vc, ok := ps.Res.(env.Decimal); ok { + res = float32(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Device: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Device: context fn SystemScaleForWindow: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["locale"] + if !ok { + return nil, errors.New("context to fyne.Device: expected context to have function Locale") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Device: context fn Locale: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Locale = func(ctx env.RyeCtx) fyne.Locale { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Locale + { + nat, natOk := ps.Res.(env.Native) + var natValOk bool + var natVal fyne.Locale + if natOk { + natVal, natValOk = nat.Value.(fyne.Locale) + } + if natValOk { + res = natVal + } else { + var u string + if vc, ok := ps.Res.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Device: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = fyne.Locale(u) + } + } + return res + } + default: + return nil, errors.New("context to fyne.Device: context fn Locale: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Disableable struct { + self env.RyeCtx + fn_Enable func(self env.RyeCtx) + fn_Disable func(self env.RyeCtx) + fn_Disabled func(self env.RyeCtx) bool +} + +func (self *iface_fyne_Disableable) Enable() { + self.fn_Enable(self.self) +} + +func (self *iface_fyne_Disableable) Disable() { + self.fn_Disable(self.self) +} + +func (self *iface_fyne_Disableable) Disabled() bool { + return self.fn_Disabled(self.self) +} + +func ctxTo_fyne_Disableable(ps *env.ProgramState, v env.RyeCtx) (fyne.Disableable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Disableable{ + self: v, + } + ctxObj0, ok := wordToObj["enable"] + if !ok { + return nil, errors.New("context to fyne.Disableable: expected context to have function Enable") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Disableable: context fn Enable: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Enable = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Disableable: context fn Enable: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["disable"] + if !ok { + return nil, errors.New("context to fyne.Disableable: expected context to have function Disable") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Disableable: context fn Disable: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Disable = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Disableable: context fn Disable: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["disabled"] + if !ok { + return nil, errors.New("context to fyne.Disableable: expected context to have function Disabled") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Disableable: context fn Disabled: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Disabled = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Disableable: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Disableable: context fn Disabled: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_DoubleTappable struct { + self env.RyeCtx + fn_DoubleTapped func(self env.RyeCtx, arg0 *fyne.PointEvent) +} + +func (self *iface_fyne_DoubleTappable) DoubleTapped(arg0 *fyne.PointEvent) { + self.fn_DoubleTapped(self.self, arg0) +} + +func ctxTo_fyne_DoubleTappable(ps *env.ProgramState, v env.RyeCtx) (fyne.DoubleTappable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_DoubleTappable{ + self: v, + } + ctxObj0, ok := wordToObj["double-tapped"] + if !ok { + return nil, errors.New("context to fyne.DoubleTappable: expected context to have function DoubleTapped") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.DoubleTappable: context fn DoubleTapped: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_DoubleTapped = func(ctx env.RyeCtx, farg0 *fyne.PointEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.PointEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.DoubleTappable: context fn DoubleTapped: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Draggable struct { + self env.RyeCtx + fn_Dragged func(self env.RyeCtx, arg0 *fyne.DragEvent) + fn_DragEnd func(self env.RyeCtx) +} + +func (self *iface_fyne_Draggable) Dragged(arg0 *fyne.DragEvent) { + self.fn_Dragged(self.self, arg0) +} + +func (self *iface_fyne_Draggable) DragEnd() { + self.fn_DragEnd(self.self) +} + +func ctxTo_fyne_Draggable(ps *env.ProgramState, v env.RyeCtx) (fyne.Draggable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Draggable{ + self: v, + } + ctxObj0, ok := wordToObj["dragged"] + if !ok { + return nil, errors.New("context to fyne.Draggable: expected context to have function Dragged") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Draggable: context fn Dragged: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Dragged = func(ctx env.RyeCtx, farg0 *fyne.DragEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.DragEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Draggable: context fn Dragged: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["drag-end"] + if !ok { + return nil, errors.New("context to fyne.Draggable: expected context to have function DragEnd") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Draggable: context fn DragEnd: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_DragEnd = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Draggable: context fn DragEnd: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Driver struct { + self env.RyeCtx + fn_CreateWindow func(self env.RyeCtx, arg0 string) fyne.Window + fn_AllWindows func(self env.RyeCtx) []fyne.Window + fn_RenderedTextSize func(self env.RyeCtx, arg0 string, arg1 float32, arg2 fyne.TextStyle, arg3 fyne.Resource) (fyne.Size, float32) + fn_CanvasForObject func(self env.RyeCtx, arg0 fyne.CanvasObject) fyne.Canvas + fn_AbsolutePositionForObject func(self env.RyeCtx, arg0 fyne.CanvasObject) fyne.Position + fn_Device func(self env.RyeCtx) fyne.Device + fn_Run func(self env.RyeCtx) + fn_Quit func(self env.RyeCtx) + fn_StartAnimation func(self env.RyeCtx, arg0 *fyne.Animation) + fn_StopAnimation func(self env.RyeCtx, arg0 *fyne.Animation) + fn_DoubleTapDelay func(self env.RyeCtx) time.Duration + fn_SetDisableScreenBlanking func(self env.RyeCtx, arg0 bool) +} + +func (self *iface_fyne_Driver) CreateWindow(arg0 string) fyne.Window { + return self.fn_CreateWindow(self.self, arg0) +} + +func (self *iface_fyne_Driver) AllWindows() []fyne.Window { + return self.fn_AllWindows(self.self) +} + +func (self *iface_fyne_Driver) RenderedTextSize(arg0 string, arg1 float32, arg2 fyne.TextStyle, arg3 fyne.Resource) (fyne.Size, float32) { + return self.fn_RenderedTextSize(self.self, arg0, arg1, arg2, arg3) +} + +func (self *iface_fyne_Driver) CanvasForObject(arg0 fyne.CanvasObject) fyne.Canvas { + return self.fn_CanvasForObject(self.self, arg0) +} + +func (self *iface_fyne_Driver) AbsolutePositionForObject(arg0 fyne.CanvasObject) fyne.Position { + return self.fn_AbsolutePositionForObject(self.self, arg0) +} + +func (self *iface_fyne_Driver) Device() fyne.Device { + return self.fn_Device(self.self) +} + +func (self *iface_fyne_Driver) Run() { + self.fn_Run(self.self) +} + +func (self *iface_fyne_Driver) Quit() { + self.fn_Quit(self.self) +} + +func (self *iface_fyne_Driver) StartAnimation(arg0 *fyne.Animation) { + self.fn_StartAnimation(self.self, arg0) +} + +func (self *iface_fyne_Driver) StopAnimation(arg0 *fyne.Animation) { + self.fn_StopAnimation(self.self, arg0) +} + +func (self *iface_fyne_Driver) DoubleTapDelay() time.Duration { + return self.fn_DoubleTapDelay(self.self) +} + +func (self *iface_fyne_Driver) SetDisableScreenBlanking(arg0 bool) { + self.fn_SetDisableScreenBlanking(self.self, arg0) +} + +func ctxTo_fyne_Driver(ps *env.ProgramState, v env.RyeCtx) (fyne.Driver, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Driver{ + self: v, + } + ctxObj0, ok := wordToObj["create-window"] + if !ok { + return nil, errors.New("context to fyne.Driver: expected context to have function CreateWindow") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Driver: context fn CreateWindow: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CreateWindow = func(ctx env.RyeCtx, farg0 string) fyne.Window { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res fyne.Window + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected native of type fyne.Window, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Driver: context fn CreateWindow: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["all-windows"] + if !ok { + return nil, errors.New("context to fyne.Driver: expected context to have function AllWindows") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Driver: context fn AllWindows: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AllWindows = func(ctx env.RyeCtx) []fyne.Window { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res []fyne.Window + switch v := ps.Res.(type) { + case env.Block: + res = make([]fyne.Window, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"block item: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"block item: "+"expected native of type fyne.Window, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"block item: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + (*iv) = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"block item: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Driver: context fn AllWindows: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["rendered-text-size"] + if !ok { + return nil, errors.New("context to fyne.Driver: expected context to have function RenderedTextSize") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 4 { + return nil, errors.New("context to fyne.Driver: context fn RenderedTextSize: " + "expected 4 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RenderedTextSize = func(ctx env.RyeCtx, farg0 string, farg1 float32, farg2 fyne.TextStyle, farg3 fyne.Resource) (fyne.Size, float32) { + var farg0Val, farg1Val, farg2Val, farg3Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewDecimal(float64(farg1)) + farg2Val = *env.NewNative(ps.Idx, &farg2, "Go(*fyne.TextStyle)") + farg3Val = ifaceToNative(ps.Idx, farg3, "Go(fyne.Resource)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val, farg3Val) + var res0 fyne.Size + var res1 float32 + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + res0 = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected native of type *fyne.Size, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[1].(env.Decimal); ok { + res1 = float32(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, res.Series.S[1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to fyne.Driver: context fn RenderedTextSize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["canvas-for-object"] + if !ok { + return nil, errors.New("context to fyne.Driver: expected context to have function CanvasForObject") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Driver: context fn CanvasForObject: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CanvasForObject = func(ctx env.RyeCtx, farg0 fyne.CanvasObject) fyne.Canvas { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res fyne.Canvas + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected native of type fyne.Canvas, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Driver: context fn CanvasForObject: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["absolute-position-for-object"] + if !ok { + return nil, errors.New("context to fyne.Driver: expected context to have function AbsolutePositionForObject") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Driver: context fn AbsolutePositionForObject: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AbsolutePositionForObject = func(ctx env.RyeCtx, farg0 fyne.CanvasObject) fyne.Position { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res fyne.Position + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + res = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected native of type *fyne.Position, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Driver: context fn AbsolutePositionForObject: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["device"] + if !ok { + return nil, errors.New("context to fyne.Driver: expected context to have function Device") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Driver: context fn Device: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Device = func(ctx env.RyeCtx) fyne.Device { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Device + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Device(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Device); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected native of type fyne.Device, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Driver: context fn Device: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["run"] + if !ok { + return nil, errors.New("context to fyne.Driver: expected context to have function Run") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Driver: context fn Run: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Run = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Driver: context fn Run: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["quit"] + if !ok { + return nil, errors.New("context to fyne.Driver: expected context to have function Quit") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Driver: context fn Quit: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Quit = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Driver: context fn Quit: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["start-animation"] + if !ok { + return nil, errors.New("context to fyne.Driver: expected context to have function StartAnimation") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Driver: context fn StartAnimation: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_StartAnimation = func(ctx env.RyeCtx, farg0 *fyne.Animation) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.Animation)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Driver: context fn StartAnimation: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["stop-animation"] + if !ok { + return nil, errors.New("context to fyne.Driver: expected context to have function StopAnimation") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Driver: context fn StopAnimation: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_StopAnimation = func(ctx env.RyeCtx, farg0 *fyne.Animation) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.Animation)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Driver: context fn StopAnimation: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["double-tap-delay"] + if !ok { + return nil, errors.New("context to fyne.Driver: expected context to have function DoubleTapDelay") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Driver: context fn DoubleTapDelay: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_DoubleTapDelay = func(ctx env.RyeCtx) time.Duration { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res time.Duration + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(time.Duration); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected native of type time.Duration, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Driver: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Driver: context fn DoubleTapDelay: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["set-disable-screen-blanking"] + if !ok { + return nil, errors.New("context to fyne.Driver: expected context to have function SetDisableScreenBlanking") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Driver: context fn SetDisableScreenBlanking: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetDisableScreenBlanking = func(ctx env.RyeCtx, farg0 bool) { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Driver: context fn SetDisableScreenBlanking: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Focusable struct { + self env.RyeCtx + fn_FocusGained func(self env.RyeCtx) + fn_FocusLost func(self env.RyeCtx) + fn_TypedRune func(self env.RyeCtx, arg0 rune) + fn_TypedKey func(self env.RyeCtx, arg0 *fyne.KeyEvent) +} + +func (self *iface_fyne_Focusable) FocusGained() { + self.fn_FocusGained(self.self) +} + +func (self *iface_fyne_Focusable) FocusLost() { + self.fn_FocusLost(self.self) +} + +func (self *iface_fyne_Focusable) TypedRune(arg0 rune) { + self.fn_TypedRune(self.self, arg0) +} + +func (self *iface_fyne_Focusable) TypedKey(arg0 *fyne.KeyEvent) { + self.fn_TypedKey(self.self, arg0) +} + +func ctxTo_fyne_Focusable(ps *env.ProgramState, v env.RyeCtx) (fyne.Focusable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Focusable{ + self: v, + } + ctxObj0, ok := wordToObj["focus-gained"] + if !ok { + return nil, errors.New("context to fyne.Focusable: expected context to have function FocusGained") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Focusable: context fn FocusGained: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FocusGained = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Focusable: context fn FocusGained: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["focus-lost"] + if !ok { + return nil, errors.New("context to fyne.Focusable: expected context to have function FocusLost") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Focusable: context fn FocusLost: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FocusLost = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Focusable: context fn FocusLost: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["typed-rune"] + if !ok { + return nil, errors.New("context to fyne.Focusable: expected context to have function TypedRune") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Focusable: context fn TypedRune: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TypedRune = func(ctx env.RyeCtx, farg0 rune) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Focusable: context fn TypedRune: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["typed-key"] + if !ok { + return nil, errors.New("context to fyne.Focusable: expected context to have function TypedKey") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Focusable: context fn TypedKey: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TypedKey = func(ctx env.RyeCtx, farg0 *fyne.KeyEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.KeyEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Focusable: context fn TypedKey: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_KeyboardShortcut struct { + self env.RyeCtx + fn_Key func(self env.RyeCtx) fyne.KeyName + fn_Mod func(self env.RyeCtx) fyne.KeyModifier + fn_ShortcutName func(self env.RyeCtx) string +} + +func (self *iface_fyne_KeyboardShortcut) Key() fyne.KeyName { + return self.fn_Key(self.self) +} + +func (self *iface_fyne_KeyboardShortcut) Mod() fyne.KeyModifier { + return self.fn_Mod(self.self) +} + +func (self *iface_fyne_KeyboardShortcut) ShortcutName() string { + return self.fn_ShortcutName(self.self) +} + +func ctxTo_fyne_KeyboardShortcut(ps *env.ProgramState, v env.RyeCtx) (fyne.KeyboardShortcut, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_KeyboardShortcut{ + self: v, + } + ctxObj0, ok := wordToObj["key"] + if !ok { + return nil, errors.New("context to fyne.KeyboardShortcut: expected context to have function Key") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.KeyboardShortcut: context fn Key: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Key = func(ctx env.RyeCtx) fyne.KeyName { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.KeyName + { + nat, natOk := ps.Res.(env.Native) + var natValOk bool + var natVal fyne.KeyName + if natOk { + natVal, natValOk = nat.Value.(fyne.KeyName) + } + if natValOk { + res = natVal + } else { + var u string + if vc, ok := ps.Res.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.KeyboardShortcut: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = fyne.KeyName(u) + } + } + return res + } + default: + return nil, errors.New("context to fyne.KeyboardShortcut: context fn Key: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["mod"] + if !ok { + return nil, errors.New("context to fyne.KeyboardShortcut: expected context to have function Mod") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.KeyboardShortcut: context fn Mod: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Mod = func(ctx env.RyeCtx) fyne.KeyModifier { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.KeyModifier + { + nat, natOk := ps.Res.(env.Native) + var natValOk bool + var natVal fyne.KeyModifier + if natOk { + natVal, natValOk = nat.Value.(fyne.KeyModifier) + } + if natValOk { + res = natVal + } else { + var u int + if vc, ok := ps.Res.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.KeyboardShortcut: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = fyne.KeyModifier(u) + } + } + return res + } + default: + return nil, errors.New("context to fyne.KeyboardShortcut: context fn Mod: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["shortcut-name"] + if !ok { + return nil, errors.New("context to fyne.KeyboardShortcut: expected context to have function ShortcutName") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.KeyboardShortcut: context fn ShortcutName: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ShortcutName = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.KeyboardShortcut: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.KeyboardShortcut: context fn ShortcutName: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Layout struct { + self env.RyeCtx + fn_Layout func(self env.RyeCtx, arg0 []fyne.CanvasObject, arg1 fyne.Size) + fn_MinSize func(self env.RyeCtx, arg0 []fyne.CanvasObject) fyne.Size +} + +func (self *iface_fyne_Layout) Layout(arg0 []fyne.CanvasObject, arg1 fyne.Size) { + self.fn_Layout(self.self, arg0, arg1) +} + +func (self *iface_fyne_Layout) MinSize(arg0 []fyne.CanvasObject) fyne.Size { + return self.fn_MinSize(self.self, arg0) +} + +func ctxTo_fyne_Layout(ps *env.ProgramState, v env.RyeCtx) (fyne.Layout, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Layout{ + self: v, + } + ctxObj0, ok := wordToObj["layout"] + if !ok { + return nil, errors.New("context to fyne.Layout: expected context to have function Layout") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Layout: context fn Layout: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Layout = func(ctx env.RyeCtx, farg0 []fyne.CanvasObject, farg1 fyne.Size) { + var farg0Val, farg1Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.CanvasObject)") + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + farg1Val = *env.NewNative(ps.Idx, &farg1, "Go(*fyne.Size)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + default: + return nil, errors.New("context to fyne.Layout: context fn Layout: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["min-size"] + if !ok { + return nil, errors.New("context to fyne.Layout: expected context to have function MinSize") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Layout: context fn MinSize: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_MinSize = func(ctx env.RyeCtx, farg0 []fyne.CanvasObject) fyne.Size { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.CanvasObject)") + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res fyne.Size + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + res = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Layout: arg 0: callback result: "+"expected native of type *fyne.Size, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Layout: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Layout: context fn MinSize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_LegacyTheme struct { + self env.RyeCtx + fn_BackgroundColor func(self env.RyeCtx) color.Color + fn_ButtonColor func(self env.RyeCtx) color.Color + fn_DisabledButtonColor func(self env.RyeCtx) color.Color + fn_TextColor func(self env.RyeCtx) color.Color + fn_DisabledTextColor func(self env.RyeCtx) color.Color + fn_PlaceHolderColor func(self env.RyeCtx) color.Color + fn_PrimaryColor func(self env.RyeCtx) color.Color + fn_HoverColor func(self env.RyeCtx) color.Color + fn_FocusColor func(self env.RyeCtx) color.Color + fn_ScrollBarColor func(self env.RyeCtx) color.Color + fn_ShadowColor func(self env.RyeCtx) color.Color + fn_TextSize func(self env.RyeCtx) int + fn_TextFont func(self env.RyeCtx) fyne.Resource + fn_TextBoldFont func(self env.RyeCtx) fyne.Resource + fn_TextItalicFont func(self env.RyeCtx) fyne.Resource + fn_TextBoldItalicFont func(self env.RyeCtx) fyne.Resource + fn_TextMonospaceFont func(self env.RyeCtx) fyne.Resource + fn_Padding func(self env.RyeCtx) int + fn_IconInlineSize func(self env.RyeCtx) int + fn_ScrollBarSize func(self env.RyeCtx) int + fn_ScrollBarSmallSize func(self env.RyeCtx) int +} + +func (self *iface_fyne_LegacyTheme) BackgroundColor() color.Color { + return self.fn_BackgroundColor(self.self) +} + +func (self *iface_fyne_LegacyTheme) ButtonColor() color.Color { + return self.fn_ButtonColor(self.self) +} + +func (self *iface_fyne_LegacyTheme) DisabledButtonColor() color.Color { + return self.fn_DisabledButtonColor(self.self) +} + +func (self *iface_fyne_LegacyTheme) TextColor() color.Color { + return self.fn_TextColor(self.self) +} + +func (self *iface_fyne_LegacyTheme) DisabledTextColor() color.Color { + return self.fn_DisabledTextColor(self.self) +} + +func (self *iface_fyne_LegacyTheme) PlaceHolderColor() color.Color { + return self.fn_PlaceHolderColor(self.self) +} + +func (self *iface_fyne_LegacyTheme) PrimaryColor() color.Color { + return self.fn_PrimaryColor(self.self) +} + +func (self *iface_fyne_LegacyTheme) HoverColor() color.Color { + return self.fn_HoverColor(self.self) +} + +func (self *iface_fyne_LegacyTheme) FocusColor() color.Color { + return self.fn_FocusColor(self.self) +} + +func (self *iface_fyne_LegacyTheme) ScrollBarColor() color.Color { + return self.fn_ScrollBarColor(self.self) +} + +func (self *iface_fyne_LegacyTheme) ShadowColor() color.Color { + return self.fn_ShadowColor(self.self) +} + +func (self *iface_fyne_LegacyTheme) TextSize() int { + return self.fn_TextSize(self.self) +} + +func (self *iface_fyne_LegacyTheme) TextFont() fyne.Resource { + return self.fn_TextFont(self.self) +} + +func (self *iface_fyne_LegacyTheme) TextBoldFont() fyne.Resource { + return self.fn_TextBoldFont(self.self) +} + +func (self *iface_fyne_LegacyTheme) TextItalicFont() fyne.Resource { + return self.fn_TextItalicFont(self.self) +} + +func (self *iface_fyne_LegacyTheme) TextBoldItalicFont() fyne.Resource { + return self.fn_TextBoldItalicFont(self.self) +} + +func (self *iface_fyne_LegacyTheme) TextMonospaceFont() fyne.Resource { + return self.fn_TextMonospaceFont(self.self) +} + +func (self *iface_fyne_LegacyTheme) Padding() int { + return self.fn_Padding(self.self) +} + +func (self *iface_fyne_LegacyTheme) IconInlineSize() int { + return self.fn_IconInlineSize(self.self) +} + +func (self *iface_fyne_LegacyTheme) ScrollBarSize() int { + return self.fn_ScrollBarSize(self.self) +} + +func (self *iface_fyne_LegacyTheme) ScrollBarSmallSize() int { + return self.fn_ScrollBarSmallSize(self.self) +} + +func ctxTo_fyne_LegacyTheme(ps *env.ProgramState, v env.RyeCtx) (fyne.LegacyTheme, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_LegacyTheme{ + self: v, + } + ctxObj0, ok := wordToObj["background-color"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function BackgroundColor") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn BackgroundColor: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_BackgroundColor = func(ctx env.RyeCtx) color.Color { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res color.Color + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type color.Color, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn BackgroundColor: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["button-color"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function ButtonColor") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn ButtonColor: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ButtonColor = func(ctx env.RyeCtx) color.Color { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res color.Color + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type color.Color, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn ButtonColor: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["disabled-button-color"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function DisabledButtonColor") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn DisabledButtonColor: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_DisabledButtonColor = func(ctx env.RyeCtx) color.Color { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res color.Color + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type color.Color, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn DisabledButtonColor: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["text-color"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function TextColor") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn TextColor: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TextColor = func(ctx env.RyeCtx) color.Color { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res color.Color + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type color.Color, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn TextColor: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["disabled-text-color"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function DisabledTextColor") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn DisabledTextColor: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_DisabledTextColor = func(ctx env.RyeCtx) color.Color { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res color.Color + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type color.Color, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn DisabledTextColor: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["place-holder-color"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function PlaceHolderColor") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn PlaceHolderColor: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_PlaceHolderColor = func(ctx env.RyeCtx) color.Color { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res color.Color + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type color.Color, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn PlaceHolderColor: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["primary-color"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function PrimaryColor") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn PrimaryColor: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_PrimaryColor = func(ctx env.RyeCtx) color.Color { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res color.Color + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type color.Color, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn PrimaryColor: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["hover-color"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function HoverColor") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn HoverColor: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_HoverColor = func(ctx env.RyeCtx) color.Color { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res color.Color + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type color.Color, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn HoverColor: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["focus-color"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function FocusColor") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn FocusColor: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FocusColor = func(ctx env.RyeCtx) color.Color { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res color.Color + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type color.Color, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn FocusColor: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["scroll-bar-color"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function ScrollBarColor") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn ScrollBarColor: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ScrollBarColor = func(ctx env.RyeCtx) color.Color { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res color.Color + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type color.Color, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn ScrollBarColor: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["shadow-color"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function ShadowColor") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn ShadowColor: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ShadowColor = func(ctx env.RyeCtx) color.Color { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res color.Color + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type color.Color, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn ShadowColor: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["text-size"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function TextSize") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn TextSize: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TextSize = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn TextSize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj12, ok := wordToObj["text-font"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function TextFont") + } + switch fn := ctxObj12.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn TextFont: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TextFont = func(ctx env.RyeCtx) fyne.Resource { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Resource + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type fyne.Resource, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn TextFont: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj13, ok := wordToObj["text-bold-font"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function TextBoldFont") + } + switch fn := ctxObj13.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn TextBoldFont: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TextBoldFont = func(ctx env.RyeCtx) fyne.Resource { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Resource + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type fyne.Resource, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn TextBoldFont: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj14, ok := wordToObj["text-italic-font"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function TextItalicFont") + } + switch fn := ctxObj14.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn TextItalicFont: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TextItalicFont = func(ctx env.RyeCtx) fyne.Resource { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Resource + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type fyne.Resource, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn TextItalicFont: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj15, ok := wordToObj["text-bold-italic-font"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function TextBoldItalicFont") + } + switch fn := ctxObj15.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn TextBoldItalicFont: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TextBoldItalicFont = func(ctx env.RyeCtx) fyne.Resource { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Resource + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type fyne.Resource, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn TextBoldItalicFont: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj16, ok := wordToObj["text-monospace-font"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function TextMonospaceFont") + } + switch fn := ctxObj16.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn TextMonospaceFont: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TextMonospaceFont = func(ctx env.RyeCtx) fyne.Resource { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Resource + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native of type fyne.Resource, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn TextMonospaceFont: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj17, ok := wordToObj["padding"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function Padding") + } + switch fn := ctxObj17.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn Padding: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Padding = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn Padding: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj18, ok := wordToObj["icon-inline-size"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function IconInlineSize") + } + switch fn := ctxObj18.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn IconInlineSize: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_IconInlineSize = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn IconInlineSize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj19, ok := wordToObj["scroll-bar-size"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function ScrollBarSize") + } + switch fn := ctxObj19.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn ScrollBarSize: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ScrollBarSize = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn ScrollBarSize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj20, ok := wordToObj["scroll-bar-small-size"] + if !ok { + return nil, errors.New("context to fyne.LegacyTheme: expected context to have function ScrollBarSmallSize") + } + switch fn := ctxObj20.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.LegacyTheme: context fn ScrollBarSmallSize: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ScrollBarSmallSize = func(ctx env.RyeCtx) int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.LegacyTheme: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.LegacyTheme: context fn ScrollBarSmallSize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Lifecycle struct { + self env.RyeCtx + fn_SetOnEnteredForeground func(self env.RyeCtx, arg0 func()) + fn_SetOnExitedForeground func(self env.RyeCtx, arg0 func()) + fn_SetOnStarted func(self env.RyeCtx, arg0 func()) + fn_SetOnStopped func(self env.RyeCtx, arg0 func()) +} + +func (self *iface_fyne_Lifecycle) SetOnEnteredForeground(arg0 func()) { + self.fn_SetOnEnteredForeground(self.self, arg0) +} + +func (self *iface_fyne_Lifecycle) SetOnExitedForeground(arg0 func()) { + self.fn_SetOnExitedForeground(self.self, arg0) +} + +func (self *iface_fyne_Lifecycle) SetOnStarted(arg0 func()) { + self.fn_SetOnStarted(self.self, arg0) +} + +func (self *iface_fyne_Lifecycle) SetOnStopped(arg0 func()) { + self.fn_SetOnStopped(self.self, arg0) +} + +func ctxTo_fyne_Lifecycle(ps *env.ProgramState, v env.RyeCtx) (fyne.Lifecycle, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Lifecycle{ + self: v, + } + ctxObj0, ok := wordToObj["set-on-entered-foreground"] + if !ok { + return nil, errors.New("context to fyne.Lifecycle: expected context to have function SetOnEnteredForeground") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Lifecycle: context fn SetOnEnteredForeground: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetOnEnteredForeground = func(ctx env.RyeCtx, farg0 func()) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + farg0() + return nil + }, 0, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Lifecycle: context fn SetOnEnteredForeground: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set-on-exited-foreground"] + if !ok { + return nil, errors.New("context to fyne.Lifecycle: expected context to have function SetOnExitedForeground") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Lifecycle: context fn SetOnExitedForeground: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetOnExitedForeground = func(ctx env.RyeCtx, farg0 func()) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + farg0() + return nil + }, 0, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Lifecycle: context fn SetOnExitedForeground: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["set-on-started"] + if !ok { + return nil, errors.New("context to fyne.Lifecycle: expected context to have function SetOnStarted") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Lifecycle: context fn SetOnStarted: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetOnStarted = func(ctx env.RyeCtx, farg0 func()) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + farg0() + return nil + }, 0, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Lifecycle: context fn SetOnStarted: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["set-on-stopped"] + if !ok { + return nil, errors.New("context to fyne.Lifecycle: expected context to have function SetOnStopped") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Lifecycle: context fn SetOnStopped: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetOnStopped = func(ctx env.RyeCtx, farg0 func()) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + farg0() + return nil + }, 0, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Lifecycle: context fn SetOnStopped: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_ListableURI struct { + self env.RyeCtx + fn_List func(self env.RyeCtx) ([]fyne.URI, error) + fn_Extension func(self env.RyeCtx) string + fn_Name func(self env.RyeCtx) string + fn_MimeType func(self env.RyeCtx) string + fn_Scheme func(self env.RyeCtx) string + fn_Authority func(self env.RyeCtx) string + fn_Path func(self env.RyeCtx) string + fn_Query func(self env.RyeCtx) string + fn_Fragment func(self env.RyeCtx) string + fn_String func(self env.RyeCtx) string +} + +func (self *iface_fyne_ListableURI) List() ([]fyne.URI, error) { + return self.fn_List(self.self) +} + +func (self *iface_fyne_ListableURI) Extension() string { + return self.fn_Extension(self.self) +} + +func (self *iface_fyne_ListableURI) Name() string { + return self.fn_Name(self.self) +} + +func (self *iface_fyne_ListableURI) MimeType() string { + return self.fn_MimeType(self.self) +} + +func (self *iface_fyne_ListableURI) Scheme() string { + return self.fn_Scheme(self.self) +} + +func (self *iface_fyne_ListableURI) Authority() string { + return self.fn_Authority(self.self) +} + +func (self *iface_fyne_ListableURI) Path() string { + return self.fn_Path(self.self) +} + +func (self *iface_fyne_ListableURI) Query() string { + return self.fn_Query(self.self) +} + +func (self *iface_fyne_ListableURI) Fragment() string { + return self.fn_Fragment(self.self) +} + +func (self *iface_fyne_ListableURI) String() string { + return self.fn_String(self.self) +} + +func ctxTo_fyne_ListableURI(ps *env.ProgramState, v env.RyeCtx) (fyne.ListableURI, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_ListableURI{ + self: v, + } + ctxObj0, ok := wordToObj["list"] + if !ok { + return nil, errors.New("context to fyne.ListableURI: expected context to have function List") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.ListableURI: context fn List: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_List = func(ctx env.RyeCtx) ([]fyne.URI, error) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 []fyne.URI + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]fyne.URI, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"block item: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"block item: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"block item: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + (*iv) = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"block item: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to fyne.ListableURI: context fn List: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["extension"] + if !ok { + return nil, errors.New("context to fyne.ListableURI: expected context to have function Extension") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.ListableURI: context fn Extension: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Extension = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.ListableURI: context fn Extension: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["name"] + if !ok { + return nil, errors.New("context to fyne.ListableURI: expected context to have function Name") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.ListableURI: context fn Name: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Name = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.ListableURI: context fn Name: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["mime-type"] + if !ok { + return nil, errors.New("context to fyne.ListableURI: expected context to have function MimeType") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.ListableURI: context fn MimeType: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_MimeType = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.ListableURI: context fn MimeType: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["scheme"] + if !ok { + return nil, errors.New("context to fyne.ListableURI: expected context to have function Scheme") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.ListableURI: context fn Scheme: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Scheme = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.ListableURI: context fn Scheme: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["authority"] + if !ok { + return nil, errors.New("context to fyne.ListableURI: expected context to have function Authority") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.ListableURI: context fn Authority: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Authority = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.ListableURI: context fn Authority: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["path"] + if !ok { + return nil, errors.New("context to fyne.ListableURI: expected context to have function Path") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.ListableURI: context fn Path: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Path = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.ListableURI: context fn Path: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["query"] + if !ok { + return nil, errors.New("context to fyne.ListableURI: expected context to have function Query") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.ListableURI: context fn Query: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Query = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.ListableURI: context fn Query: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["fragment"] + if !ok { + return nil, errors.New("context to fyne.ListableURI: expected context to have function Fragment") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.ListableURI: context fn Fragment: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Fragment = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.ListableURI: context fn Fragment: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["string"] + if !ok { + return nil, errors.New("context to fyne.ListableURI: expected context to have function String") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.ListableURI: context fn String: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_String = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ListableURI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.ListableURI: context fn String: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_OverlayStack struct { + self env.RyeCtx + fn_Add func(self env.RyeCtx, arg0 fyne.CanvasObject) + fn_List func(self env.RyeCtx) []fyne.CanvasObject + fn_Remove func(self env.RyeCtx, arg0 fyne.CanvasObject) + fn_Top func(self env.RyeCtx) fyne.CanvasObject +} + +func (self *iface_fyne_OverlayStack) Add(arg0 fyne.CanvasObject) { + self.fn_Add(self.self, arg0) +} + +func (self *iface_fyne_OverlayStack) List() []fyne.CanvasObject { + return self.fn_List(self.self) +} + +func (self *iface_fyne_OverlayStack) Remove(arg0 fyne.CanvasObject) { + self.fn_Remove(self.self, arg0) +} + +func (self *iface_fyne_OverlayStack) Top() fyne.CanvasObject { + return self.fn_Top(self.self) +} + +func ctxTo_fyne_OverlayStack(ps *env.ProgramState, v env.RyeCtx) (fyne.OverlayStack, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_OverlayStack{ + self: v, + } + ctxObj0, ok := wordToObj["add"] + if !ok { + return nil, errors.New("context to fyne.OverlayStack: expected context to have function Add") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.OverlayStack: context fn Add: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Add = func(ctx env.RyeCtx, farg0 fyne.CanvasObject) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.OverlayStack: context fn Add: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["list"] + if !ok { + return nil, errors.New("context to fyne.OverlayStack: expected context to have function List") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.OverlayStack: context fn List: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_List = func(ctx env.RyeCtx) []fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res []fyne.CanvasObject + switch v := ps.Res.(type) { + case env.Block: + res = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.OverlayStack: arg 0: callback result: "+"block item: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.OverlayStack: arg 0: callback result: "+"block item: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.OverlayStack: arg 0: callback result: "+"block item: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + (*iv) = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.OverlayStack: arg 0: callback result: "+"block item: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.OverlayStack: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.OverlayStack: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.OverlayStack: context fn List: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to fyne.OverlayStack: expected context to have function Remove") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.OverlayStack: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 fyne.CanvasObject) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.OverlayStack: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["top"] + if !ok { + return nil, errors.New("context to fyne.OverlayStack: expected context to have function Top") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.OverlayStack: context fn Top: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Top = func(ctx env.RyeCtx) fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.OverlayStack: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.OverlayStack: arg 0: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.OverlayStack: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.OverlayStack: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.OverlayStack: context fn Top: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Preferences struct { + self env.RyeCtx + fn_Bool func(self env.RyeCtx, arg0 string) bool + fn_BoolWithFallback func(self env.RyeCtx, arg0 string, arg1 bool) bool + fn_SetBool func(self env.RyeCtx, arg0 string, arg1 bool) + fn_BoolList func(self env.RyeCtx, arg0 string) []bool + fn_BoolListWithFallback func(self env.RyeCtx, arg0 string, arg1 []bool) []bool + fn_SetBoolList func(self env.RyeCtx, arg0 string, arg1 []bool) + fn_Float func(self env.RyeCtx, arg0 string) float64 + fn_FloatWithFallback func(self env.RyeCtx, arg0 string, arg1 float64) float64 + fn_SetFloat func(self env.RyeCtx, arg0 string, arg1 float64) + fn_FloatList func(self env.RyeCtx, arg0 string) []float64 + fn_FloatListWithFallback func(self env.RyeCtx, arg0 string, arg1 []float64) []float64 + fn_SetFloatList func(self env.RyeCtx, arg0 string, arg1 []float64) + fn_Int func(self env.RyeCtx, arg0 string) int + fn_IntWithFallback func(self env.RyeCtx, arg0 string, arg1 int) int + fn_SetInt func(self env.RyeCtx, arg0 string, arg1 int) + fn_IntList func(self env.RyeCtx, arg0 string) []int + fn_IntListWithFallback func(self env.RyeCtx, arg0 string, arg1 []int) []int + fn_SetIntList func(self env.RyeCtx, arg0 string, arg1 []int) + fn_String func(self env.RyeCtx, arg0 string) string + fn_StringWithFallback func(self env.RyeCtx, arg0 string, arg1 string) string + fn_SetString func(self env.RyeCtx, arg0 string, arg1 string) + fn_StringList func(self env.RyeCtx, arg0 string) []string + fn_StringListWithFallback func(self env.RyeCtx, arg0 string, arg1 []string) []string + fn_SetStringList func(self env.RyeCtx, arg0 string, arg1 []string) + fn_RemoveValue func(self env.RyeCtx, arg0 string) + fn_AddChangeListener func(self env.RyeCtx, arg0 func()) + fn_ChangeListeners func(self env.RyeCtx) []func() +} + +func (self *iface_fyne_Preferences) Bool(arg0 string) bool { + return self.fn_Bool(self.self, arg0) +} + +func (self *iface_fyne_Preferences) BoolWithFallback(arg0 string, arg1 bool) bool { + return self.fn_BoolWithFallback(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) SetBool(arg0 string, arg1 bool) { + self.fn_SetBool(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) BoolList(arg0 string) []bool { + return self.fn_BoolList(self.self, arg0) +} + +func (self *iface_fyne_Preferences) BoolListWithFallback(arg0 string, arg1 []bool) []bool { + return self.fn_BoolListWithFallback(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) SetBoolList(arg0 string, arg1 []bool) { + self.fn_SetBoolList(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) Float(arg0 string) float64 { + return self.fn_Float(self.self, arg0) +} + +func (self *iface_fyne_Preferences) FloatWithFallback(arg0 string, arg1 float64) float64 { + return self.fn_FloatWithFallback(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) SetFloat(arg0 string, arg1 float64) { + self.fn_SetFloat(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) FloatList(arg0 string) []float64 { + return self.fn_FloatList(self.self, arg0) +} + +func (self *iface_fyne_Preferences) FloatListWithFallback(arg0 string, arg1 []float64) []float64 { + return self.fn_FloatListWithFallback(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) SetFloatList(arg0 string, arg1 []float64) { + self.fn_SetFloatList(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) Int(arg0 string) int { + return self.fn_Int(self.self, arg0) +} + +func (self *iface_fyne_Preferences) IntWithFallback(arg0 string, arg1 int) int { + return self.fn_IntWithFallback(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) SetInt(arg0 string, arg1 int) { + self.fn_SetInt(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) IntList(arg0 string) []int { + return self.fn_IntList(self.self, arg0) +} + +func (self *iface_fyne_Preferences) IntListWithFallback(arg0 string, arg1 []int) []int { + return self.fn_IntListWithFallback(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) SetIntList(arg0 string, arg1 []int) { + self.fn_SetIntList(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) String(arg0 string) string { + return self.fn_String(self.self, arg0) +} + +func (self *iface_fyne_Preferences) StringWithFallback(arg0 string, arg1 string) string { + return self.fn_StringWithFallback(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) SetString(arg0 string, arg1 string) { + self.fn_SetString(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) StringList(arg0 string) []string { + return self.fn_StringList(self.self, arg0) +} + +func (self *iface_fyne_Preferences) StringListWithFallback(arg0 string, arg1 []string) []string { + return self.fn_StringListWithFallback(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) SetStringList(arg0 string, arg1 []string) { + self.fn_SetStringList(self.self, arg0, arg1) +} + +func (self *iface_fyne_Preferences) RemoveValue(arg0 string) { + self.fn_RemoveValue(self.self, arg0) +} + +func (self *iface_fyne_Preferences) AddChangeListener(arg0 func()) { + self.fn_AddChangeListener(self.self, arg0) +} + +func (self *iface_fyne_Preferences) ChangeListeners() []func() { + return self.fn_ChangeListeners(self.self) +} + +func ctxTo_fyne_Preferences(ps *env.ProgramState, v env.RyeCtx) (fyne.Preferences, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Preferences{ + self: v, + } + ctxObj0, ok := wordToObj["bool"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function Bool") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Preferences: context fn Bool: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Bool = func(ctx env.RyeCtx, farg0 string) bool { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn Bool: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["bool-with-fallback"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function BoolWithFallback") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn BoolWithFallback: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_BoolWithFallback = func(ctx env.RyeCtx, farg0 string, farg1 bool) bool { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewInteger(boolToInt64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn BoolWithFallback: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["set-bool"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function SetBool") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn SetBool: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetBool = func(ctx env.RyeCtx, farg0 string, farg1 bool) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewInteger(boolToInt64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + default: + return nil, errors.New("context to fyne.Preferences: context fn SetBool: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["bool-list"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function BoolList") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Preferences: context fn BoolList: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_BoolList = func(ctx env.RyeCtx, farg0 string) []bool { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []bool + switch v := ps.Res.(type) { + case env.Block: + res = make([]bool, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn BoolList: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["bool-list-with-fallback"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function BoolListWithFallback") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn BoolListWithFallback: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_BoolListWithFallback = func(ctx env.RyeCtx, farg0 string, farg1 []bool) []bool { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + { + items := make([]env.Object, len(farg1)) + for i, it := range farg1 { + items[i] = *env.NewInteger(boolToInt64(it)) + } + farg1Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res []bool + switch v := ps.Res.(type) { + case env.Block: + res = make([]bool, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn BoolListWithFallback: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set-bool-list"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function SetBoolList") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn SetBoolList: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetBoolList = func(ctx env.RyeCtx, farg0 string, farg1 []bool) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + { + items := make([]env.Object, len(farg1)) + for i, it := range farg1 { + items[i] = *env.NewInteger(boolToInt64(it)) + } + farg1Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + default: + return nil, errors.New("context to fyne.Preferences: context fn SetBoolList: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["float"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function Float") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Preferences: context fn Float: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Float = func(ctx env.RyeCtx, farg0 string) float64 { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res float64 + if vc, ok := ps.Res.(env.Decimal); ok { + res = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn Float: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["float-with-fallback"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function FloatWithFallback") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn FloatWithFallback: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FloatWithFallback = func(ctx env.RyeCtx, farg0 string, farg1 float64) float64 { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewDecimal(float64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res float64 + if vc, ok := ps.Res.(env.Decimal); ok { + res = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn FloatWithFallback: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["set-float"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function SetFloat") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn SetFloat: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetFloat = func(ctx env.RyeCtx, farg0 string, farg1 float64) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewDecimal(float64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + default: + return nil, errors.New("context to fyne.Preferences: context fn SetFloat: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["float-list"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function FloatList") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Preferences: context fn FloatList: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FloatList = func(ctx env.RyeCtx, farg0 string) []float64 { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []float64 + switch v := ps.Res.(type) { + case env.Block: + res = make([]float64, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.Decimal); ok { + (*iv) = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"block item: "+"expected decimal, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn FloatList: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["float-list-with-fallback"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function FloatListWithFallback") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn FloatListWithFallback: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FloatListWithFallback = func(ctx env.RyeCtx, farg0 string, farg1 []float64) []float64 { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + { + items := make([]env.Object, len(farg1)) + for i, it := range farg1 { + items[i] = *env.NewDecimal(float64(it)) + } + farg1Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res []float64 + switch v := ps.Res.(type) { + case env.Block: + res = make([]float64, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.Decimal); ok { + (*iv) = float64(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"block item: "+"expected decimal, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn FloatListWithFallback: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["set-float-list"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function SetFloatList") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn SetFloatList: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetFloatList = func(ctx env.RyeCtx, farg0 string, farg1 []float64) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + { + items := make([]env.Object, len(farg1)) + for i, it := range farg1 { + items[i] = *env.NewDecimal(float64(it)) + } + farg1Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + default: + return nil, errors.New("context to fyne.Preferences: context fn SetFloatList: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj12, ok := wordToObj["int"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function Int") + } + switch fn := ctxObj12.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Preferences: context fn Int: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Int = func(ctx env.RyeCtx, farg0 string) int { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn Int: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj13, ok := wordToObj["int-with-fallback"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function IntWithFallback") + } + switch fn := ctxObj13.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn IntWithFallback: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_IntWithFallback = func(ctx env.RyeCtx, farg0 string, farg1 int) int { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewInteger(int64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn IntWithFallback: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj14, ok := wordToObj["set-int"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function SetInt") + } + switch fn := ctxObj14.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn SetInt: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetInt = func(ctx env.RyeCtx, farg0 string, farg1 int) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewInteger(int64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + default: + return nil, errors.New("context to fyne.Preferences: context fn SetInt: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj15, ok := wordToObj["int-list"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function IntList") + } + switch fn := ctxObj15.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Preferences: context fn IntList: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_IntList = func(ctx env.RyeCtx, farg0 string) []int { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []int + switch v := ps.Res.(type) { + case env.Block: + res = make([]int, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn IntList: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj16, ok := wordToObj["int-list-with-fallback"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function IntListWithFallback") + } + switch fn := ctxObj16.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn IntListWithFallback: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_IntListWithFallback = func(ctx env.RyeCtx, farg0 string, farg1 []int) []int { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + { + items := make([]env.Object, len(farg1)) + for i, it := range farg1 { + items[i] = *env.NewInteger(int64(it)) + } + farg1Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res []int + switch v := ps.Res.(type) { + case env.Block: + res = make([]int, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn IntListWithFallback: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj17, ok := wordToObj["set-int-list"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function SetIntList") + } + switch fn := ctxObj17.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn SetIntList: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetIntList = func(ctx env.RyeCtx, farg0 string, farg1 []int) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + { + items := make([]env.Object, len(farg1)) + for i, it := range farg1 { + items[i] = *env.NewInteger(int64(it)) + } + farg1Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + default: + return nil, errors.New("context to fyne.Preferences: context fn SetIntList: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj18, ok := wordToObj["string"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function String") + } + switch fn := ctxObj18.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Preferences: context fn String: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_String = func(ctx env.RyeCtx, farg0 string) string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn String: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj19, ok := wordToObj["string-with-fallback"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function StringWithFallback") + } + switch fn := ctxObj19.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn StringWithFallback: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_StringWithFallback = func(ctx env.RyeCtx, farg0 string, farg1 string) string { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn StringWithFallback: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj20, ok := wordToObj["set-string"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function SetString") + } + switch fn := ctxObj20.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn SetString: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetString = func(ctx env.RyeCtx, farg0 string, farg1 string) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + farg1Val = *env.NewString(farg1) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + default: + return nil, errors.New("context to fyne.Preferences: context fn SetString: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj21, ok := wordToObj["string-list"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function StringList") + } + switch fn := ctxObj21.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Preferences: context fn StringList: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_StringList = func(ctx env.RyeCtx, farg0 string) []string { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn StringList: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj22, ok := wordToObj["string-list-with-fallback"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function StringListWithFallback") + } + switch fn := ctxObj22.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn StringListWithFallback: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_StringListWithFallback = func(ctx env.RyeCtx, farg0 string, farg1 []string) []string { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + { + items := make([]env.Object, len(farg1)) + for i, it := range farg1 { + items[i] = *env.NewString(it) + } + farg1Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn StringListWithFallback: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj23, ok := wordToObj["set-string-list"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function SetStringList") + } + switch fn := ctxObj23.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Preferences: context fn SetStringList: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetStringList = func(ctx env.RyeCtx, farg0 string, farg1 []string) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(farg0) + { + items := make([]env.Object, len(farg1)) + for i, it := range farg1 { + items[i] = *env.NewString(it) + } + farg1Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + default: + return nil, errors.New("context to fyne.Preferences: context fn SetStringList: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj24, ok := wordToObj["remove-value"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function RemoveValue") + } + switch fn := ctxObj24.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Preferences: context fn RemoveValue: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveValue = func(ctx env.RyeCtx, farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Preferences: context fn RemoveValue: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj25, ok := wordToObj["add-change-listener"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function AddChangeListener") + } + switch fn := ctxObj25.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Preferences: context fn AddChangeListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddChangeListener = func(ctx env.RyeCtx, farg0 func()) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + farg0() + return nil + }, 0, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Preferences: context fn AddChangeListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj26, ok := wordToObj["change-listeners"] + if !ok { + return nil, errors.New("context to fyne.Preferences: expected context to have function ChangeListeners") + } + switch fn := ctxObj26.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Preferences: context fn ChangeListeners: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ChangeListeners = func(ctx env.RyeCtx) []func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res []func() + switch v := ps.Res.(type) { + case env.Block: + res = make([]func(), len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + switch fn := it.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"block item: "+"expected 0 function arguments, but got "+strconv.Itoa(fn.Argsn), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + (*iv) = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"block item: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(fn.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + (*iv) = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"block item: "+"expected function or nil, but got "+objectDebugString(ps.Idx, fn), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Preferences: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Preferences: context fn ChangeListeners: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Resource struct { + self env.RyeCtx + fn_Name func(self env.RyeCtx) string + fn_Content func(self env.RyeCtx) []byte +} + +func (self *iface_fyne_Resource) Name() string { + return self.fn_Name(self.self) +} + +func (self *iface_fyne_Resource) Content() []byte { + return self.fn_Content(self.self) +} + +func ctxTo_fyne_Resource(ps *env.ProgramState, v env.RyeCtx) (fyne.Resource, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Resource{ + self: v, + } + ctxObj0, ok := wordToObj["name"] + if !ok { + return nil, errors.New("context to fyne.Resource: expected context to have function Name") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Resource: context fn Name: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Name = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Resource: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Resource: context fn Name: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["content"] + if !ok { + return nil, errors.New("context to fyne.Resource: expected context to have function Content") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Resource: context fn Content: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Content = func(ctx env.RyeCtx) []byte { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res []byte + switch v := ps.Res.(type) { + case env.Block: + res = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Resource: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Resource: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Resource: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Resource: context fn Content: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Scrollable struct { + self env.RyeCtx + fn_Scrolled func(self env.RyeCtx, arg0 *fyne.ScrollEvent) +} + +func (self *iface_fyne_Scrollable) Scrolled(arg0 *fyne.ScrollEvent) { + self.fn_Scrolled(self.self, arg0) +} + +func ctxTo_fyne_Scrollable(ps *env.ProgramState, v env.RyeCtx) (fyne.Scrollable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Scrollable{ + self: v, + } + ctxObj0, ok := wordToObj["scrolled"] + if !ok { + return nil, errors.New("context to fyne.Scrollable: expected context to have function Scrolled") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Scrollable: context fn Scrolled: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Scrolled = func(ctx env.RyeCtx, farg0 *fyne.ScrollEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.ScrollEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Scrollable: context fn Scrolled: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_SecondaryTappable struct { + self env.RyeCtx + fn_TappedSecondary func(self env.RyeCtx, arg0 *fyne.PointEvent) +} + +func (self *iface_fyne_SecondaryTappable) TappedSecondary(arg0 *fyne.PointEvent) { + self.fn_TappedSecondary(self.self, arg0) +} + +func ctxTo_fyne_SecondaryTappable(ps *env.ProgramState, v env.RyeCtx) (fyne.SecondaryTappable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_SecondaryTappable{ + self: v, + } + ctxObj0, ok := wordToObj["tapped-secondary"] + if !ok { + return nil, errors.New("context to fyne.SecondaryTappable: expected context to have function TappedSecondary") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.SecondaryTappable: context fn TappedSecondary: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TappedSecondary = func(ctx env.RyeCtx, farg0 *fyne.PointEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.PointEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.SecondaryTappable: context fn TappedSecondary: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Settings struct { + self env.RyeCtx + fn_Theme func(self env.RyeCtx) fyne.Theme + fn_SetTheme func(self env.RyeCtx, arg0 fyne.Theme) + fn_ThemeVariant func(self env.RyeCtx) fyne.ThemeVariant + fn_Scale func(self env.RyeCtx) float32 + fn_PrimaryColor func(self env.RyeCtx) string + fn_AddChangeListener func(self env.RyeCtx, arg0 chan fyne.Settings) + fn_BuildType func(self env.RyeCtx) fyne.BuildType + fn_ShowAnimations func(self env.RyeCtx) bool +} + +func (self *iface_fyne_Settings) Theme() fyne.Theme { + return self.fn_Theme(self.self) +} + +func (self *iface_fyne_Settings) SetTheme(arg0 fyne.Theme) { + self.fn_SetTheme(self.self, arg0) +} + +func (self *iface_fyne_Settings) ThemeVariant() fyne.ThemeVariant { + return self.fn_ThemeVariant(self.self) +} + +func (self *iface_fyne_Settings) Scale() float32 { + return self.fn_Scale(self.self) +} + +func (self *iface_fyne_Settings) PrimaryColor() string { + return self.fn_PrimaryColor(self.self) +} + +func (self *iface_fyne_Settings) AddChangeListener(arg0 chan fyne.Settings) { + self.fn_AddChangeListener(self.self, arg0) +} + +func (self *iface_fyne_Settings) BuildType() fyne.BuildType { + return self.fn_BuildType(self.self) +} + +func (self *iface_fyne_Settings) ShowAnimations() bool { + return self.fn_ShowAnimations(self.self) +} + +func ctxTo_fyne_Settings(ps *env.ProgramState, v env.RyeCtx) (fyne.Settings, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Settings{ + self: v, + } + ctxObj0, ok := wordToObj["theme"] + if !ok { + return nil, errors.New("context to fyne.Settings: expected context to have function Theme") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Settings: context fn Theme: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Theme = func(ctx env.RyeCtx) fyne.Theme { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Theme + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Theme(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Settings: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Theme); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Settings: arg 0: callback result: "+"expected native of type fyne.Theme, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Settings: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Settings: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Settings: context fn Theme: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set-theme"] + if !ok { + return nil, errors.New("context to fyne.Settings: expected context to have function SetTheme") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Settings: context fn SetTheme: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetTheme = func(ctx env.RyeCtx, farg0 fyne.Theme) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Theme)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Settings: context fn SetTheme: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["theme-variant"] + if !ok { + return nil, errors.New("context to fyne.Settings: expected context to have function ThemeVariant") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Settings: context fn ThemeVariant: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ThemeVariant = func(ctx env.RyeCtx) fyne.ThemeVariant { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.ThemeVariant + { + nat, natOk := ps.Res.(env.Native) + var natValOk bool + var natVal fyne.ThemeVariant + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeVariant) + } + if natValOk { + res = natVal + } else { + var u uint + if vc, ok := ps.Res.(env.Integer); ok { + u = uint(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Settings: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = fyne.ThemeVariant(u) + } + } + return res + } + default: + return nil, errors.New("context to fyne.Settings: context fn ThemeVariant: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["scale"] + if !ok { + return nil, errors.New("context to fyne.Settings: expected context to have function Scale") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Settings: context fn Scale: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Scale = func(ctx env.RyeCtx) float32 { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res float32 + if vc, ok := ps.Res.(env.Decimal); ok { + res = float32(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Settings: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Settings: context fn Scale: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["primary-color"] + if !ok { + return nil, errors.New("context to fyne.Settings: expected context to have function PrimaryColor") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Settings: context fn PrimaryColor: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_PrimaryColor = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Settings: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Settings: context fn PrimaryColor: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["add-change-listener"] + if !ok { + return nil, errors.New("context to fyne.Settings: expected context to have function AddChangeListener") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Settings: context fn AddChangeListener: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddChangeListener = func(ctx env.RyeCtx, farg0 chan fyne.Settings) { + var farg0Val env.Object + if farg0 != nil { + ch := make(chan *env.Object) + go func() { + for { + select { + case v, ok := <-ch: + if !ok { + close(farg0) + return + } + var ov fyne.Settings + switch v := (*v).(type) { + case env.RyeCtx: + var err error + ov, err = ctxTo_fyne_Settings(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n", + "context to fyne.Settings: arg 0: channel object: "+err.Error(), + ) + return + } + case env.Native: + if vc, ok := v.Value.(fyne.Settings); ok { + ov = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n", + "context to fyne.Settings: arg 0: channel object: "+"expected native of type fyne.Settings, but got "+objectDebugString(ps.Idx, v), + ) + return + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n", + "context to fyne.Settings: arg 0: channel object: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + ) + return + } + ov = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n", + "context to fyne.Settings: arg 0: channel object: "+"expected native, but got "+objectDebugString(ps.Idx, v), + ) + return + } + farg0 <- ov + case v, ok := <-farg0: + if !ok { + close(ch) + return + } + var ov env.Object + ov = ifaceToNative(ps.Idx, v, "Go(fyne.Settings)") + ch <- &ov + } + } + }() + farg0Val = *env.NewNative(ps.Idx, ch, "Rye-channel") + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Settings: context fn AddChangeListener: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["build-type"] + if !ok { + return nil, errors.New("context to fyne.Settings: expected context to have function BuildType") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Settings: context fn BuildType: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_BuildType = func(ctx env.RyeCtx) fyne.BuildType { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.BuildType + { + nat, natOk := ps.Res.(env.Native) + var natValOk bool + var natVal fyne.BuildType + if natOk { + natVal, natValOk = nat.Value.(fyne.BuildType) + } + if natValOk { + res = natVal + } else { + var u int + if vc, ok := ps.Res.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Settings: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = fyne.BuildType(u) + } + } + return res + } + default: + return nil, errors.New("context to fyne.Settings: context fn BuildType: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["show-animations"] + if !ok { + return nil, errors.New("context to fyne.Settings: expected context to have function ShowAnimations") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Settings: context fn ShowAnimations: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ShowAnimations = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Settings: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Settings: context fn ShowAnimations: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Shortcut struct { + self env.RyeCtx + fn_ShortcutName func(self env.RyeCtx) string +} + +func (self *iface_fyne_Shortcut) ShortcutName() string { + return self.fn_ShortcutName(self.self) +} + +func ctxTo_fyne_Shortcut(ps *env.ProgramState, v env.RyeCtx) (fyne.Shortcut, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Shortcut{ + self: v, + } + ctxObj0, ok := wordToObj["shortcut-name"] + if !ok { + return nil, errors.New("context to fyne.Shortcut: expected context to have function ShortcutName") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Shortcut: context fn ShortcutName: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ShortcutName = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Shortcut: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Shortcut: context fn ShortcutName: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Shortcutable struct { + self env.RyeCtx + fn_TypedShortcut func(self env.RyeCtx, arg0 fyne.Shortcut) +} + +func (self *iface_fyne_Shortcutable) TypedShortcut(arg0 fyne.Shortcut) { + self.fn_TypedShortcut(self.self, arg0) +} + +func ctxTo_fyne_Shortcutable(ps *env.ProgramState, v env.RyeCtx) (fyne.Shortcutable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Shortcutable{ + self: v, + } + ctxObj0, ok := wordToObj["typed-shortcut"] + if !ok { + return nil, errors.New("context to fyne.Shortcutable: expected context to have function TypedShortcut") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Shortcutable: context fn TypedShortcut: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TypedShortcut = func(ctx env.RyeCtx, farg0 fyne.Shortcut) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Shortcut)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Shortcutable: context fn TypedShortcut: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Storage struct { + self env.RyeCtx + fn_RootURI func(self env.RyeCtx) fyne.URI + fn_Create func(self env.RyeCtx, arg0 string) (fyne.URIWriteCloser, error) + fn_Open func(self env.RyeCtx, arg0 string) (fyne.URIReadCloser, error) + fn_Save func(self env.RyeCtx, arg0 string) (fyne.URIWriteCloser, error) + fn_Remove func(self env.RyeCtx, arg0 string) error + fn_List func(self env.RyeCtx) []string +} + +func (self *iface_fyne_Storage) RootURI() fyne.URI { + return self.fn_RootURI(self.self) +} + +func (self *iface_fyne_Storage) Create(arg0 string) (fyne.URIWriteCloser, error) { + return self.fn_Create(self.self, arg0) +} + +func (self *iface_fyne_Storage) Open(arg0 string) (fyne.URIReadCloser, error) { + return self.fn_Open(self.self, arg0) +} + +func (self *iface_fyne_Storage) Save(arg0 string) (fyne.URIWriteCloser, error) { + return self.fn_Save(self.self, arg0) +} + +func (self *iface_fyne_Storage) Remove(arg0 string) error { + return self.fn_Remove(self.self, arg0) +} + +func (self *iface_fyne_Storage) List() []string { + return self.fn_List(self.self) +} + +func ctxTo_fyne_Storage(ps *env.ProgramState, v env.RyeCtx) (fyne.Storage, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Storage{ + self: v, + } + ctxObj0, ok := wordToObj["root-uri"] + if !ok { + return nil, errors.New("context to fyne.Storage: expected context to have function RootURI") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Storage: context fn RootURI: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RootURI = func(ctx env.RyeCtx) fyne.URI { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.URI + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Storage: context fn RootURI: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["create"] + if !ok { + return nil, errors.New("context to fyne.Storage: expected context to have function Create") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Storage: context fn Create: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Create = func(ctx env.RyeCtx, farg0 string) (fyne.URIWriteCloser, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URIWriteCloser + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URIWriteCloser(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWriteCloser); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected native of type fyne.URIWriteCloser, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to fyne.Storage: context fn Create: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["open"] + if !ok { + return nil, errors.New("context to fyne.Storage: expected context to have function Open") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Storage: context fn Open: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Open = func(ctx env.RyeCtx, farg0 string) (fyne.URIReadCloser, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URIReadCloser + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URIReadCloser(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URIReadCloser); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected native of type fyne.URIReadCloser, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to fyne.Storage: context fn Open: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["save"] + if !ok { + return nil, errors.New("context to fyne.Storage: expected context to have function Save") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Storage: context fn Save: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Save = func(ctx env.RyeCtx, farg0 string) (fyne.URIWriteCloser, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URIWriteCloser + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URIWriteCloser(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWriteCloser); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected native of type fyne.URIWriteCloser, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to fyne.Storage: context fn Save: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["remove"] + if !ok { + return nil, errors.New("context to fyne.Storage: expected context to have function Remove") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Storage: context fn Remove: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Remove = func(ctx env.RyeCtx, farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Storage: context fn Remove: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["list"] + if !ok { + return nil, errors.New("context to fyne.Storage: expected context to have function List") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Storage: context fn List: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_List = func(ctx env.RyeCtx) []string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res []string + switch v := ps.Res.(type) { + case env.Block: + res = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Storage: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Storage: context fn List: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Tabbable struct { + self env.RyeCtx + fn_AcceptsTab func(self env.RyeCtx) bool +} + +func (self *iface_fyne_Tabbable) AcceptsTab() bool { + return self.fn_AcceptsTab(self.self) +} + +func ctxTo_fyne_Tabbable(ps *env.ProgramState, v env.RyeCtx) (fyne.Tabbable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Tabbable{ + self: v, + } + ctxObj0, ok := wordToObj["accepts-tab"] + if !ok { + return nil, errors.New("context to fyne.Tabbable: expected context to have function AcceptsTab") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Tabbable: context fn AcceptsTab: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AcceptsTab = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Tabbable: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Tabbable: context fn AcceptsTab: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Tappable struct { + self env.RyeCtx + fn_Tapped func(self env.RyeCtx, arg0 *fyne.PointEvent) +} + +func (self *iface_fyne_Tappable) Tapped(arg0 *fyne.PointEvent) { + self.fn_Tapped(self.self, arg0) +} + +func ctxTo_fyne_Tappable(ps *env.ProgramState, v env.RyeCtx) (fyne.Tappable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Tappable{ + self: v, + } + ctxObj0, ok := wordToObj["tapped"] + if !ok { + return nil, errors.New("context to fyne.Tappable: expected context to have function Tapped") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Tappable: context fn Tapped: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Tapped = func(ctx env.RyeCtx, farg0 *fyne.PointEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.PointEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Tappable: context fn Tapped: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Theme struct { + self env.RyeCtx + fn_Color func(self env.RyeCtx, arg0 fyne.ThemeColorName, arg1 fyne.ThemeVariant) color.Color + fn_Font func(self env.RyeCtx, arg0 fyne.TextStyle) fyne.Resource + fn_Icon func(self env.RyeCtx, arg0 fyne.ThemeIconName) fyne.Resource + fn_Size func(self env.RyeCtx, arg0 fyne.ThemeSizeName) float32 +} + +func (self *iface_fyne_Theme) Color(arg0 fyne.ThemeColorName, arg1 fyne.ThemeVariant) color.Color { + return self.fn_Color(self.self, arg0, arg1) +} + +func (self *iface_fyne_Theme) Font(arg0 fyne.TextStyle) fyne.Resource { + return self.fn_Font(self.self, arg0) +} + +func (self *iface_fyne_Theme) Icon(arg0 fyne.ThemeIconName) fyne.Resource { + return self.fn_Icon(self.self, arg0) +} + +func (self *iface_fyne_Theme) Size(arg0 fyne.ThemeSizeName) float32 { + return self.fn_Size(self.self, arg0) +} + +func ctxTo_fyne_Theme(ps *env.ProgramState, v env.RyeCtx) (fyne.Theme, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Theme{ + self: v, + } + ctxObj0, ok := wordToObj["color"] + if !ok { + return nil, errors.New("context to fyne.Theme: expected context to have function Color") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to fyne.Theme: context fn Color: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Color = func(ctx env.RyeCtx, farg0 fyne.ThemeColorName, farg1 fyne.ThemeVariant) color.Color { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewString(string(farg0)) + farg1Val = *env.NewInteger(int64(uint(farg1))) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res color.Color + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Theme: arg 0: callback result: "+"expected native of type color.Color, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Theme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Theme: context fn Color: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["font"] + if !ok { + return nil, errors.New("context to fyne.Theme: expected context to have function Font") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Theme: context fn Font: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Font = func(ctx env.RyeCtx, farg0 fyne.TextStyle) fyne.Resource { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*fyne.TextStyle)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res fyne.Resource + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Theme: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Theme: arg 0: callback result: "+"expected native of type fyne.Resource, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Theme: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Theme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Theme: context fn Font: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["icon"] + if !ok { + return nil, errors.New("context to fyne.Theme: expected context to have function Icon") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Theme: context fn Icon: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Icon = func(ctx env.RyeCtx, farg0 fyne.ThemeIconName) fyne.Resource { + var farg0Val env.Object + farg0Val = *env.NewString(string(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res fyne.Resource + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Theme: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Theme: arg 0: callback result: "+"expected native of type fyne.Resource, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Theme: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Theme: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Theme: context fn Icon: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["size"] + if !ok { + return nil, errors.New("context to fyne.Theme: expected context to have function Size") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Theme: context fn Size: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Size = func(ctx env.RyeCtx, farg0 fyne.ThemeSizeName) float32 { + var farg0Val env.Object + farg0Val = *env.NewString(string(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res float32 + if vc, ok := ps.Res.(env.Decimal); ok { + res = float32(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Theme: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Theme: context fn Size: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_ThemedResource struct { + self env.RyeCtx + fn_ThemeColorName func(self env.RyeCtx) fyne.ThemeColorName + fn_Name func(self env.RyeCtx) string + fn_Content func(self env.RyeCtx) []byte +} + +func (self *iface_fyne_ThemedResource) ThemeColorName() fyne.ThemeColorName { + return self.fn_ThemeColorName(self.self) +} + +func (self *iface_fyne_ThemedResource) Name() string { + return self.fn_Name(self.self) +} + +func (self *iface_fyne_ThemedResource) Content() []byte { + return self.fn_Content(self.self) +} + +func ctxTo_fyne_ThemedResource(ps *env.ProgramState, v env.RyeCtx) (fyne.ThemedResource, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_ThemedResource{ + self: v, + } + ctxObj0, ok := wordToObj["theme-color-name"] + if !ok { + return nil, errors.New("context to fyne.ThemedResource: expected context to have function ThemeColorName") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.ThemedResource: context fn ThemeColorName: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ThemeColorName = func(ctx env.RyeCtx) fyne.ThemeColorName { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.ThemeColorName + { + nat, natOk := ps.Res.(env.Native) + var natValOk bool + var natVal fyne.ThemeColorName + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeColorName) + } + if natValOk { + res = natVal + } else { + var u string + if vc, ok := ps.Res.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ThemedResource: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = fyne.ThemeColorName(u) + } + } + return res + } + default: + return nil, errors.New("context to fyne.ThemedResource: context fn ThemeColorName: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["name"] + if !ok { + return nil, errors.New("context to fyne.ThemedResource: expected context to have function Name") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.ThemedResource: context fn Name: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Name = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ThemedResource: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.ThemedResource: context fn Name: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["content"] + if !ok { + return nil, errors.New("context to fyne.ThemedResource: expected context to have function Content") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.ThemedResource: context fn Content: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Content = func(ctx env.RyeCtx) []byte { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res []byte + switch v := ps.Res.(type) { + case env.Block: + res = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ThemedResource: arg 0: callback result: "+"block item: "+"expected integer, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ThemedResource: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.ThemedResource: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.ThemedResource: context fn Content: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_URI struct { + self env.RyeCtx + fn_Extension func(self env.RyeCtx) string + fn_Name func(self env.RyeCtx) string + fn_MimeType func(self env.RyeCtx) string + fn_Scheme func(self env.RyeCtx) string + fn_Authority func(self env.RyeCtx) string + fn_Path func(self env.RyeCtx) string + fn_Query func(self env.RyeCtx) string + fn_Fragment func(self env.RyeCtx) string + fn_String func(self env.RyeCtx) string +} + +func (self *iface_fyne_URI) Extension() string { + return self.fn_Extension(self.self) +} + +func (self *iface_fyne_URI) Name() string { + return self.fn_Name(self.self) +} + +func (self *iface_fyne_URI) MimeType() string { + return self.fn_MimeType(self.self) +} + +func (self *iface_fyne_URI) Scheme() string { + return self.fn_Scheme(self.self) +} + +func (self *iface_fyne_URI) Authority() string { + return self.fn_Authority(self.self) +} + +func (self *iface_fyne_URI) Path() string { + return self.fn_Path(self.self) +} + +func (self *iface_fyne_URI) Query() string { + return self.fn_Query(self.self) +} + +func (self *iface_fyne_URI) Fragment() string { + return self.fn_Fragment(self.self) +} + +func (self *iface_fyne_URI) String() string { + return self.fn_String(self.self) +} + +func ctxTo_fyne_URI(ps *env.ProgramState, v env.RyeCtx) (fyne.URI, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_URI{ + self: v, + } + ctxObj0, ok := wordToObj["extension"] + if !ok { + return nil, errors.New("context to fyne.URI: expected context to have function Extension") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URI: context fn Extension: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Extension = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URI: context fn Extension: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["name"] + if !ok { + return nil, errors.New("context to fyne.URI: expected context to have function Name") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URI: context fn Name: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Name = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URI: context fn Name: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["mime-type"] + if !ok { + return nil, errors.New("context to fyne.URI: expected context to have function MimeType") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URI: context fn MimeType: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_MimeType = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URI: context fn MimeType: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["scheme"] + if !ok { + return nil, errors.New("context to fyne.URI: expected context to have function Scheme") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URI: context fn Scheme: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Scheme = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URI: context fn Scheme: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["authority"] + if !ok { + return nil, errors.New("context to fyne.URI: expected context to have function Authority") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URI: context fn Authority: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Authority = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URI: context fn Authority: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["path"] + if !ok { + return nil, errors.New("context to fyne.URI: expected context to have function Path") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URI: context fn Path: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Path = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URI: context fn Path: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["query"] + if !ok { + return nil, errors.New("context to fyne.URI: expected context to have function Query") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URI: context fn Query: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Query = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URI: context fn Query: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["fragment"] + if !ok { + return nil, errors.New("context to fyne.URI: expected context to have function Fragment") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URI: context fn Fragment: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Fragment = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URI: context fn Fragment: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["string"] + if !ok { + return nil, errors.New("context to fyne.URI: expected context to have function String") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URI: context fn String: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_String = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URI: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URI: context fn String: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_URIReadCloser struct { + self env.RyeCtx + fn_URI func(self env.RyeCtx) fyne.URI + fn_Read func(self env.RyeCtx, arg0 []byte) (int, error) + fn_Close func(self env.RyeCtx) error +} + +func (self *iface_fyne_URIReadCloser) URI() fyne.URI { + return self.fn_URI(self.self) +} + +func (self *iface_fyne_URIReadCloser) Read(arg0 []byte) (int, error) { + return self.fn_Read(self.self, arg0) +} + +func (self *iface_fyne_URIReadCloser) Close() error { + return self.fn_Close(self.self) +} + +func ctxTo_fyne_URIReadCloser(ps *env.ProgramState, v env.RyeCtx) (fyne.URIReadCloser, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_URIReadCloser{ + self: v, + } + ctxObj0, ok := wordToObj["uri"] + if !ok { + return nil, errors.New("context to fyne.URIReadCloser: expected context to have function URI") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URIReadCloser: context fn URI: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_URI = func(ctx env.RyeCtx) fyne.URI { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.URI + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIReadCloser: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIReadCloser: arg 0: callback result: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIReadCloser: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIReadCloser: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URIReadCloser: context fn URI: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["read"] + if !ok { + return nil, errors.New("context to fyne.URIReadCloser: expected context to have function Read") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.URIReadCloser: context fn Read: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Read = func(ctx env.RyeCtx, farg0 []byte) (int, error) { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewInteger(int64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 int + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIReadCloser: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIReadCloser: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIReadCloser: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIReadCloser: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIReadCloser: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to fyne.URIReadCloser: context fn Read: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["close"] + if !ok { + return nil, errors.New("context to fyne.URIReadCloser: expected context to have function Close") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URIReadCloser: context fn Close: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Close = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIReadCloser: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIReadCloser: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URIReadCloser: context fn Close: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_URIWithIcon struct { + self env.RyeCtx + fn_Icon func(self env.RyeCtx) fyne.Resource + fn_Extension func(self env.RyeCtx) string + fn_Name func(self env.RyeCtx) string + fn_MimeType func(self env.RyeCtx) string + fn_Scheme func(self env.RyeCtx) string + fn_Authority func(self env.RyeCtx) string + fn_Path func(self env.RyeCtx) string + fn_Query func(self env.RyeCtx) string + fn_Fragment func(self env.RyeCtx) string + fn_String func(self env.RyeCtx) string +} + +func (self *iface_fyne_URIWithIcon) Icon() fyne.Resource { + return self.fn_Icon(self.self) +} + +func (self *iface_fyne_URIWithIcon) Extension() string { + return self.fn_Extension(self.self) +} + +func (self *iface_fyne_URIWithIcon) Name() string { + return self.fn_Name(self.self) +} + +func (self *iface_fyne_URIWithIcon) MimeType() string { + return self.fn_MimeType(self.self) +} + +func (self *iface_fyne_URIWithIcon) Scheme() string { + return self.fn_Scheme(self.self) +} + +func (self *iface_fyne_URIWithIcon) Authority() string { + return self.fn_Authority(self.self) +} + +func (self *iface_fyne_URIWithIcon) Path() string { + return self.fn_Path(self.self) +} + +func (self *iface_fyne_URIWithIcon) Query() string { + return self.fn_Query(self.self) +} + +func (self *iface_fyne_URIWithIcon) Fragment() string { + return self.fn_Fragment(self.self) +} + +func (self *iface_fyne_URIWithIcon) String() string { + return self.fn_String(self.self) +} + +func ctxTo_fyne_URIWithIcon(ps *env.ProgramState, v env.RyeCtx) (fyne.URIWithIcon, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_URIWithIcon{ + self: v, + } + ctxObj0, ok := wordToObj["icon"] + if !ok { + return nil, errors.New("context to fyne.URIWithIcon: expected context to have function Icon") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URIWithIcon: context fn Icon: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Icon = func(ctx env.RyeCtx) fyne.Resource { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Resource + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWithIcon: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWithIcon: arg 0: callback result: "+"expected native of type fyne.Resource, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWithIcon: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWithIcon: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URIWithIcon: context fn Icon: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["extension"] + if !ok { + return nil, errors.New("context to fyne.URIWithIcon: expected context to have function Extension") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URIWithIcon: context fn Extension: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Extension = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWithIcon: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URIWithIcon: context fn Extension: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["name"] + if !ok { + return nil, errors.New("context to fyne.URIWithIcon: expected context to have function Name") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URIWithIcon: context fn Name: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Name = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWithIcon: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URIWithIcon: context fn Name: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["mime-type"] + if !ok { + return nil, errors.New("context to fyne.URIWithIcon: expected context to have function MimeType") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URIWithIcon: context fn MimeType: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_MimeType = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWithIcon: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URIWithIcon: context fn MimeType: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["scheme"] + if !ok { + return nil, errors.New("context to fyne.URIWithIcon: expected context to have function Scheme") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URIWithIcon: context fn Scheme: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Scheme = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWithIcon: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URIWithIcon: context fn Scheme: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["authority"] + if !ok { + return nil, errors.New("context to fyne.URIWithIcon: expected context to have function Authority") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URIWithIcon: context fn Authority: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Authority = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWithIcon: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URIWithIcon: context fn Authority: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["path"] + if !ok { + return nil, errors.New("context to fyne.URIWithIcon: expected context to have function Path") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URIWithIcon: context fn Path: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Path = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWithIcon: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URIWithIcon: context fn Path: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["query"] + if !ok { + return nil, errors.New("context to fyne.URIWithIcon: expected context to have function Query") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URIWithIcon: context fn Query: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Query = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWithIcon: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URIWithIcon: context fn Query: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["fragment"] + if !ok { + return nil, errors.New("context to fyne.URIWithIcon: expected context to have function Fragment") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URIWithIcon: context fn Fragment: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Fragment = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWithIcon: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URIWithIcon: context fn Fragment: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["string"] + if !ok { + return nil, errors.New("context to fyne.URIWithIcon: expected context to have function String") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URIWithIcon: context fn String: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_String = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWithIcon: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URIWithIcon: context fn String: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_URIWriteCloser struct { + self env.RyeCtx + fn_URI func(self env.RyeCtx) fyne.URI + fn_Write func(self env.RyeCtx, arg0 []byte) (int, error) + fn_Close func(self env.RyeCtx) error +} + +func (self *iface_fyne_URIWriteCloser) URI() fyne.URI { + return self.fn_URI(self.self) +} + +func (self *iface_fyne_URIWriteCloser) Write(arg0 []byte) (int, error) { + return self.fn_Write(self.self, arg0) +} + +func (self *iface_fyne_URIWriteCloser) Close() error { + return self.fn_Close(self.self) +} + +func ctxTo_fyne_URIWriteCloser(ps *env.ProgramState, v env.RyeCtx) (fyne.URIWriteCloser, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_URIWriteCloser{ + self: v, + } + ctxObj0, ok := wordToObj["uri"] + if !ok { + return nil, errors.New("context to fyne.URIWriteCloser: expected context to have function URI") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URIWriteCloser: context fn URI: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_URI = func(ctx env.RyeCtx) fyne.URI { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.URI + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWriteCloser: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWriteCloser: arg 0: callback result: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWriteCloser: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWriteCloser: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URIWriteCloser: context fn URI: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["write"] + if !ok { + return nil, errors.New("context to fyne.URIWriteCloser: expected context to have function Write") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.URIWriteCloser: context fn Write: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Write = func(ctx env.RyeCtx, farg0 []byte) (int, error) { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewInteger(int64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 int + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWriteCloser: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWriteCloser: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWriteCloser: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWriteCloser: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWriteCloser: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to fyne.URIWriteCloser: context fn Write: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["close"] + if !ok { + return nil, errors.New("context to fyne.URIWriteCloser: expected context to have function Close") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.URIWriteCloser: context fn Close: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Close = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWriteCloser: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.URIWriteCloser: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.URIWriteCloser: context fn Close: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Validatable struct { + self env.RyeCtx + fn_Validate func(self env.RyeCtx) error + fn_SetOnValidationChanged func(self env.RyeCtx, arg0 func(error)) +} + +func (self *iface_fyne_Validatable) Validate() error { + return self.fn_Validate(self.self) +} + +func (self *iface_fyne_Validatable) SetOnValidationChanged(arg0 func(error)) { + self.fn_SetOnValidationChanged(self.self, arg0) +} + +func ctxTo_fyne_Validatable(ps *env.ProgramState, v env.RyeCtx) (fyne.Validatable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Validatable{ + self: v, + } + ctxObj0, ok := wordToObj["validate"] + if !ok { + return nil, errors.New("context to fyne.Validatable: expected context to have function Validate") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Validatable: context fn Validate: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Validate = func(ctx env.RyeCtx) error { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Validatable: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Validatable: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Validatable: context fn Validate: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set-on-validation-changed"] + if !ok { + return nil, errors.New("context to fyne.Validatable: expected context to have function SetOnValidationChanged") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Validatable: context fn SetOnValidationChanged: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetOnValidationChanged = func(ctx env.RyeCtx, farg0 func(error)) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val error + switch v := arg0.(type) { + case env.String: + arg0Val = errors.New(v.Value) + case env.Error: + arg0Val = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("context to fyne.Validatable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("context to fyne.Validatable: arg 1: " + "expected error, string or nil, but got " + objectDebugString(ps.Idx, v)) + } + farg0(arg0Val) + return nil + }, 1, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Validatable: context fn SetOnValidationChanged: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Vector2 struct { + self env.RyeCtx + fn_Components func(self env.RyeCtx) (float32, float32) + fn_IsZero func(self env.RyeCtx) bool +} + +func (self *iface_fyne_Vector2) Components() (float32, float32) { + return self.fn_Components(self.self) +} + +func (self *iface_fyne_Vector2) IsZero() bool { + return self.fn_IsZero(self.self) +} + +func ctxTo_fyne_Vector2(ps *env.ProgramState, v env.RyeCtx) (fyne.Vector2, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Vector2{ + self: v, + } + ctxObj0, ok := wordToObj["components"] + if !ok { + return nil, errors.New("context to fyne.Vector2: expected context to have function Components") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Vector2: context fn Components: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Components = func(ctx env.RyeCtx) (float32, float32) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 float32 + var res1 float32 + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Vector2: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Vector2: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Decimal); ok { + res0 = float32(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Vector2: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[1].(env.Decimal); ok { + res1 = float32(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Vector2: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, res.Series.S[1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to fyne.Vector2: context fn Components: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["is-zero"] + if !ok { + return nil, errors.New("context to fyne.Vector2: expected context to have function IsZero") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Vector2: context fn IsZero: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_IsZero = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Vector2: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Vector2: context fn IsZero: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Widget struct { + self env.RyeCtx + fn_CreateRenderer func(self env.RyeCtx) fyne.WidgetRenderer + fn_MinSize func(self env.RyeCtx) fyne.Size + fn_Move func(self env.RyeCtx, arg0 fyne.Position) + fn_Position func(self env.RyeCtx) fyne.Position + fn_Resize func(self env.RyeCtx, arg0 fyne.Size) + fn_Size func(self env.RyeCtx) fyne.Size + fn_Hide func(self env.RyeCtx) + fn_Visible func(self env.RyeCtx) bool + fn_Show func(self env.RyeCtx) + fn_Refresh func(self env.RyeCtx) +} + +func (self *iface_fyne_Widget) CreateRenderer() fyne.WidgetRenderer { + return self.fn_CreateRenderer(self.self) +} + +func (self *iface_fyne_Widget) MinSize() fyne.Size { + return self.fn_MinSize(self.self) +} + +func (self *iface_fyne_Widget) Move(arg0 fyne.Position) { + self.fn_Move(self.self, arg0) +} + +func (self *iface_fyne_Widget) Position() fyne.Position { + return self.fn_Position(self.self) +} + +func (self *iface_fyne_Widget) Resize(arg0 fyne.Size) { + self.fn_Resize(self.self, arg0) +} + +func (self *iface_fyne_Widget) Size() fyne.Size { + return self.fn_Size(self.self) +} + +func (self *iface_fyne_Widget) Hide() { + self.fn_Hide(self.self) +} + +func (self *iface_fyne_Widget) Visible() bool { + return self.fn_Visible(self.self) +} + +func (self *iface_fyne_Widget) Show() { + self.fn_Show(self.self) +} + +func (self *iface_fyne_Widget) Refresh() { + self.fn_Refresh(self.self) +} + +func ctxTo_fyne_Widget(ps *env.ProgramState, v env.RyeCtx) (fyne.Widget, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Widget{ + self: v, + } + ctxObj0, ok := wordToObj["create-renderer"] + if !ok { + return nil, errors.New("context to fyne.Widget: expected context to have function CreateRenderer") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Widget: context fn CreateRenderer: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CreateRenderer = func(ctx env.RyeCtx) fyne.WidgetRenderer { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.WidgetRenderer + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_WidgetRenderer(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Widget: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.WidgetRenderer); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Widget: arg 0: callback result: "+"expected native of type fyne.WidgetRenderer, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Widget: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Widget: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Widget: context fn CreateRenderer: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["min-size"] + if !ok { + return nil, errors.New("context to fyne.Widget: expected context to have function MinSize") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Widget: context fn MinSize: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_MinSize = func(ctx env.RyeCtx) fyne.Size { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Size + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + res = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Widget: arg 0: callback result: "+"expected native of type *fyne.Size, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Widget: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Widget: context fn MinSize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["move"] + if !ok { + return nil, errors.New("context to fyne.Widget: expected context to have function Move") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Widget: context fn Move: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Move = func(ctx env.RyeCtx, farg0 fyne.Position) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*fyne.Position)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Widget: context fn Move: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["position"] + if !ok { + return nil, errors.New("context to fyne.Widget: expected context to have function Position") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Widget: context fn Position: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Position = func(ctx env.RyeCtx) fyne.Position { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Position + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + res = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Widget: arg 0: callback result: "+"expected native of type *fyne.Position, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Widget: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Widget: context fn Position: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["resize"] + if !ok { + return nil, errors.New("context to fyne.Widget: expected context to have function Resize") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Widget: context fn Resize: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Resize = func(ctx env.RyeCtx, farg0 fyne.Size) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*fyne.Size)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Widget: context fn Resize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["size"] + if !ok { + return nil, errors.New("context to fyne.Widget: expected context to have function Size") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Widget: context fn Size: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Size = func(ctx env.RyeCtx) fyne.Size { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Size + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + res = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Widget: arg 0: callback result: "+"expected native of type *fyne.Size, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Widget: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Widget: context fn Size: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["hide"] + if !ok { + return nil, errors.New("context to fyne.Widget: expected context to have function Hide") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Widget: context fn Hide: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Hide = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Widget: context fn Hide: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["visible"] + if !ok { + return nil, errors.New("context to fyne.Widget: expected context to have function Visible") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Widget: context fn Visible: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Visible = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Widget: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Widget: context fn Visible: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["show"] + if !ok { + return nil, errors.New("context to fyne.Widget: expected context to have function Show") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Widget: context fn Show: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Show = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Widget: context fn Show: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["refresh"] + if !ok { + return nil, errors.New("context to fyne.Widget: expected context to have function Refresh") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Widget: context fn Refresh: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Refresh = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Widget: context fn Refresh: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_WidgetRenderer struct { + self env.RyeCtx + fn_Destroy func(self env.RyeCtx) + fn_Layout func(self env.RyeCtx, arg0 fyne.Size) + fn_MinSize func(self env.RyeCtx) fyne.Size + fn_Objects func(self env.RyeCtx) []fyne.CanvasObject + fn_Refresh func(self env.RyeCtx) +} + +func (self *iface_fyne_WidgetRenderer) Destroy() { + self.fn_Destroy(self.self) +} + +func (self *iface_fyne_WidgetRenderer) Layout(arg0 fyne.Size) { + self.fn_Layout(self.self, arg0) +} + +func (self *iface_fyne_WidgetRenderer) MinSize() fyne.Size { + return self.fn_MinSize(self.self) +} + +func (self *iface_fyne_WidgetRenderer) Objects() []fyne.CanvasObject { + return self.fn_Objects(self.self) +} + +func (self *iface_fyne_WidgetRenderer) Refresh() { + self.fn_Refresh(self.self) +} + +func ctxTo_fyne_WidgetRenderer(ps *env.ProgramState, v env.RyeCtx) (fyne.WidgetRenderer, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_WidgetRenderer{ + self: v, + } + ctxObj0, ok := wordToObj["destroy"] + if !ok { + return nil, errors.New("context to fyne.WidgetRenderer: expected context to have function Destroy") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.WidgetRenderer: context fn Destroy: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Destroy = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.WidgetRenderer: context fn Destroy: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["layout"] + if !ok { + return nil, errors.New("context to fyne.WidgetRenderer: expected context to have function Layout") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.WidgetRenderer: context fn Layout: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Layout = func(ctx env.RyeCtx, farg0 fyne.Size) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*fyne.Size)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.WidgetRenderer: context fn Layout: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["min-size"] + if !ok { + return nil, errors.New("context to fyne.WidgetRenderer: expected context to have function MinSize") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.WidgetRenderer: context fn MinSize: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_MinSize = func(ctx env.RyeCtx) fyne.Size { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Size + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + res = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.WidgetRenderer: arg 0: callback result: "+"expected native of type *fyne.Size, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.WidgetRenderer: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.WidgetRenderer: context fn MinSize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["objects"] + if !ok { + return nil, errors.New("context to fyne.WidgetRenderer: expected context to have function Objects") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.WidgetRenderer: context fn Objects: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Objects = func(ctx env.RyeCtx) []fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res []fyne.CanvasObject + switch v := ps.Res.(type) { + case env.Block: + res = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.WidgetRenderer: arg 0: callback result: "+"block item: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.WidgetRenderer: arg 0: callback result: "+"block item: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.WidgetRenderer: arg 0: callback result: "+"block item: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + (*iv) = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.WidgetRenderer: arg 0: callback result: "+"block item: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.WidgetRenderer: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.WidgetRenderer: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.WidgetRenderer: context fn Objects: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["refresh"] + if !ok { + return nil, errors.New("context to fyne.WidgetRenderer: expected context to have function Refresh") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.WidgetRenderer: context fn Refresh: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Refresh = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.WidgetRenderer: context fn Refresh: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_Window struct { + self env.RyeCtx + fn_Title func(self env.RyeCtx) string + fn_SetTitle func(self env.RyeCtx, arg0 string) + fn_FullScreen func(self env.RyeCtx) bool + fn_SetFullScreen func(self env.RyeCtx, arg0 bool) + fn_Resize func(self env.RyeCtx, arg0 fyne.Size) + fn_RequestFocus func(self env.RyeCtx) + fn_FixedSize func(self env.RyeCtx) bool + fn_SetFixedSize func(self env.RyeCtx, arg0 bool) + fn_CenterOnScreen func(self env.RyeCtx) + fn_Padded func(self env.RyeCtx) bool + fn_SetPadded func(self env.RyeCtx, arg0 bool) + fn_Icon func(self env.RyeCtx) fyne.Resource + fn_SetIcon func(self env.RyeCtx, arg0 fyne.Resource) + fn_SetMaster func(self env.RyeCtx) + fn_MainMenu func(self env.RyeCtx) *fyne.MainMenu + fn_SetMainMenu func(self env.RyeCtx, arg0 *fyne.MainMenu) + fn_SetOnClosed func(self env.RyeCtx, arg0 func()) + fn_SetCloseIntercept func(self env.RyeCtx, arg0 func()) + fn_SetOnDropped func(self env.RyeCtx, arg0 func(fyne.Position, []fyne.URI)) + fn_Show func(self env.RyeCtx) + fn_Hide func(self env.RyeCtx) + fn_Close func(self env.RyeCtx) + fn_ShowAndRun func(self env.RyeCtx) + fn_Content func(self env.RyeCtx) fyne.CanvasObject + fn_SetContent func(self env.RyeCtx, arg0 fyne.CanvasObject) + fn_Canvas func(self env.RyeCtx) fyne.Canvas + fn_Clipboard func(self env.RyeCtx) fyne.Clipboard +} + +func (self *iface_fyne_Window) Title() string { + return self.fn_Title(self.self) +} + +func (self *iface_fyne_Window) SetTitle(arg0 string) { + self.fn_SetTitle(self.self, arg0) +} + +func (self *iface_fyne_Window) FullScreen() bool { + return self.fn_FullScreen(self.self) +} + +func (self *iface_fyne_Window) SetFullScreen(arg0 bool) { + self.fn_SetFullScreen(self.self, arg0) +} + +func (self *iface_fyne_Window) Resize(arg0 fyne.Size) { + self.fn_Resize(self.self, arg0) +} + +func (self *iface_fyne_Window) RequestFocus() { + self.fn_RequestFocus(self.self) +} + +func (self *iface_fyne_Window) FixedSize() bool { + return self.fn_FixedSize(self.self) +} + +func (self *iface_fyne_Window) SetFixedSize(arg0 bool) { + self.fn_SetFixedSize(self.self, arg0) +} + +func (self *iface_fyne_Window) CenterOnScreen() { + self.fn_CenterOnScreen(self.self) +} + +func (self *iface_fyne_Window) Padded() bool { + return self.fn_Padded(self.self) +} + +func (self *iface_fyne_Window) SetPadded(arg0 bool) { + self.fn_SetPadded(self.self, arg0) +} + +func (self *iface_fyne_Window) Icon() fyne.Resource { + return self.fn_Icon(self.self) +} + +func (self *iface_fyne_Window) SetIcon(arg0 fyne.Resource) { + self.fn_SetIcon(self.self, arg0) +} + +func (self *iface_fyne_Window) SetMaster() { + self.fn_SetMaster(self.self) +} + +func (self *iface_fyne_Window) MainMenu() *fyne.MainMenu { + return self.fn_MainMenu(self.self) +} + +func (self *iface_fyne_Window) SetMainMenu(arg0 *fyne.MainMenu) { + self.fn_SetMainMenu(self.self, arg0) +} + +func (self *iface_fyne_Window) SetOnClosed(arg0 func()) { + self.fn_SetOnClosed(self.self, arg0) +} + +func (self *iface_fyne_Window) SetCloseIntercept(arg0 func()) { + self.fn_SetCloseIntercept(self.self, arg0) +} + +func (self *iface_fyne_Window) SetOnDropped(arg0 func(fyne.Position, []fyne.URI)) { + self.fn_SetOnDropped(self.self, arg0) +} + +func (self *iface_fyne_Window) Show() { + self.fn_Show(self.self) +} + +func (self *iface_fyne_Window) Hide() { + self.fn_Hide(self.self) +} + +func (self *iface_fyne_Window) Close() { + self.fn_Close(self.self) +} + +func (self *iface_fyne_Window) ShowAndRun() { + self.fn_ShowAndRun(self.self) +} + +func (self *iface_fyne_Window) Content() fyne.CanvasObject { + return self.fn_Content(self.self) +} + +func (self *iface_fyne_Window) SetContent(arg0 fyne.CanvasObject) { + self.fn_SetContent(self.self, arg0) +} + +func (self *iface_fyne_Window) Canvas() fyne.Canvas { + return self.fn_Canvas(self.self) +} + +func (self *iface_fyne_Window) Clipboard() fyne.Clipboard { + return self.fn_Clipboard(self.self) +} + +func ctxTo_fyne_Window(ps *env.ProgramState, v env.RyeCtx) (fyne.Window, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_Window{ + self: v, + } + ctxObj0, ok := wordToObj["title"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function Title") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn Title: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Title = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Window: context fn Title: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["set-title"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function SetTitle") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Window: context fn SetTitle: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetTitle = func(ctx env.RyeCtx, farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Window: context fn SetTitle: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["full-screen"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function FullScreen") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn FullScreen: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FullScreen = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Window: context fn FullScreen: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["set-full-screen"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function SetFullScreen") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Window: context fn SetFullScreen: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetFullScreen = func(ctx env.RyeCtx, farg0 bool) { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Window: context fn SetFullScreen: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["resize"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function Resize") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Window: context fn Resize: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Resize = func(ctx env.RyeCtx, farg0 fyne.Size) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*fyne.Size)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Window: context fn Resize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["request-focus"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function RequestFocus") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn RequestFocus: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RequestFocus = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Window: context fn RequestFocus: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["fixed-size"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function FixedSize") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn FixedSize: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FixedSize = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Window: context fn FixedSize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["set-fixed-size"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function SetFixedSize") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Window: context fn SetFixedSize: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetFixedSize = func(ctx env.RyeCtx, farg0 bool) { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Window: context fn SetFixedSize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["center-on-screen"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function CenterOnScreen") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn CenterOnScreen: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CenterOnScreen = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Window: context fn CenterOnScreen: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["padded"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function Padded") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn Padded: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Padded = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Window: context fn Padded: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["set-padded"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function SetPadded") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Window: context fn SetPadded: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetPadded = func(ctx env.RyeCtx, farg0 bool) { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Window: context fn SetPadded: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["icon"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function Icon") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn Icon: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Icon = func(ctx env.RyeCtx) fyne.Resource { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Resource + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected native of type fyne.Resource, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Window: context fn Icon: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj12, ok := wordToObj["set-icon"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function SetIcon") + } + switch fn := ctxObj12.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Window: context fn SetIcon: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetIcon = func(ctx env.RyeCtx, farg0 fyne.Resource) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Resource)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Window: context fn SetIcon: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj13, ok := wordToObj["set-master"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function SetMaster") + } + switch fn := ctxObj13.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn SetMaster: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetMaster = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Window: context fn SetMaster: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj14, ok := wordToObj["main-menu"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function MainMenu") + } + switch fn := ctxObj14.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn MainMenu: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_MainMenu = func(ctx env.RyeCtx) *fyne.MainMenu { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res *fyne.MainMenu + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MainMenu); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected native of type *fyne.MainMenu, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Window: context fn MainMenu: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj15, ok := wordToObj["set-main-menu"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function SetMainMenu") + } + switch fn := ctxObj15.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Window: context fn SetMainMenu: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetMainMenu = func(ctx env.RyeCtx, farg0 *fyne.MainMenu) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.MainMenu)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Window: context fn SetMainMenu: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj16, ok := wordToObj["set-on-closed"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function SetOnClosed") + } + switch fn := ctxObj16.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Window: context fn SetOnClosed: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetOnClosed = func(ctx env.RyeCtx, farg0 func()) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + farg0() + return nil + }, 0, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Window: context fn SetOnClosed: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj17, ok := wordToObj["set-close-intercept"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function SetCloseIntercept") + } + switch fn := ctxObj17.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Window: context fn SetCloseIntercept: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetCloseIntercept = func(ctx env.RyeCtx, farg0 func()) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + farg0() + return nil + }, 0, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Window: context fn SetCloseIntercept: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj18, ok := wordToObj["set-on-dropped"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function SetOnDropped") + } + switch fn := ctxObj18.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Window: context fn SetOnDropped: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetOnDropped = func(ctx env.RyeCtx, farg0 func(fyne.Position, []fyne.URI)) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Position + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("context to fyne.Window: arg 1: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("context to fyne.Window: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []fyne.URI + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]fyne.URI, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("context to fyne.Window: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("context to fyne.Window: arg 2: " + "block item: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("context to fyne.Window: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("context to fyne.Window: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("context to fyne.Window: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("context to fyne.Window: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + farg0(arg0Val, arg1Val) + return nil + }, 2, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Window: context fn SetOnDropped: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj19, ok := wordToObj["show"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function Show") + } + switch fn := ctxObj19.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn Show: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Show = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Window: context fn Show: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj20, ok := wordToObj["hide"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function Hide") + } + switch fn := ctxObj20.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn Hide: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Hide = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Window: context fn Hide: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj21, ok := wordToObj["close"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function Close") + } + switch fn := ctxObj21.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn Close: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Close = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Window: context fn Close: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj22, ok := wordToObj["show-and-run"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function ShowAndRun") + } + switch fn := ctxObj22.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn ShowAndRun: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ShowAndRun = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to fyne.Window: context fn ShowAndRun: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj23, ok := wordToObj["content"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function Content") + } + switch fn := ctxObj23.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn Content: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Content = func(ctx env.RyeCtx) fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Window: context fn Content: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj24, ok := wordToObj["set-content"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function SetContent") + } + switch fn := ctxObj24.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne.Window: context fn SetContent: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetContent = func(ctx env.RyeCtx, farg0 fyne.CanvasObject) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne.Window: context fn SetContent: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj25, ok := wordToObj["canvas"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function Canvas") + } + switch fn := ctxObj25.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn Canvas: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Canvas = func(ctx env.RyeCtx) fyne.Canvas { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Canvas + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected native of type fyne.Canvas, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Window: context fn Canvas: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj26, ok := wordToObj["clipboard"] + if !ok { + return nil, errors.New("context to fyne.Window: expected context to have function Clipboard") + } + switch fn := ctxObj26.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to fyne.Window: context fn Clipboard: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Clipboard = func(ctx env.RyeCtx) fyne.Clipboard { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Clipboard + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Clipboard(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Clipboard); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected native of type fyne.Clipboard, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to fyne.Window: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to fyne.Window: context fn Clipboard: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_fyne_driver_NativeWindow struct { + self env.RyeCtx + fn_RunNative func(self env.RyeCtx, arg0 func(any)) +} + +func (self *iface_fyne_driver_NativeWindow) RunNative(arg0 func(any)) { + self.fn_RunNative(self.self, arg0) +} + +func ctxTo_fyne_driver_NativeWindow(ps *env.ProgramState, v env.RyeCtx) (fyne_driver.NativeWindow, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_fyne_driver_NativeWindow{ + self: v, + } + ctxObj0, ok := wordToObj["run-native"] + if !ok { + return nil, errors.New("context to fyne_driver.NativeWindow: expected context to have function RunNative") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to fyne_driver.NativeWindow: context fn RunNative: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RunNative = func(ctx env.RyeCtx, farg0 func(any)) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val any + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("context to fyne_driver.NativeWindow: arg 1: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("context to fyne_driver.NativeWindow: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + farg0(arg0Val) + return nil + }, 1, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to fyne_driver.NativeWindow: context fn RunNative: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_io_Reader struct { + self env.RyeCtx + fn_Read func(self env.RyeCtx, arg0 []byte) (int, error) +} + +func (self *iface_io_Reader) Read(arg0 []byte) (int, error) { + return self.fn_Read(self.self, arg0) +} + +func ctxTo_io_Reader(ps *env.ProgramState, v env.RyeCtx) (io.Reader, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_io_Reader{ + self: v, + } + ctxObj0, ok := wordToObj["read"] + if !ok { + return nil, errors.New("context to io.Reader: expected context to have function Read") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to io.Reader: context fn Read: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Read = func(ctx env.RyeCtx, farg0 []byte) (int, error) { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewInteger(int64(it)) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 int + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to io.Reader: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to io.Reader: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to io.Reader: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to io.Reader: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to io.Reader: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to io.Reader: context fn Read: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_layout_SpacerObject struct { + self env.RyeCtx + fn_ExpandVertical func(self env.RyeCtx) bool + fn_ExpandHorizontal func(self env.RyeCtx) bool +} + +func (self *iface_layout_SpacerObject) ExpandVertical() bool { + return self.fn_ExpandVertical(self.self) +} + +func (self *iface_layout_SpacerObject) ExpandHorizontal() bool { + return self.fn_ExpandHorizontal(self.self) +} + +func ctxTo_layout_SpacerObject(ps *env.ProgramState, v env.RyeCtx) (layout.SpacerObject, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_layout_SpacerObject{ + self: v, + } + ctxObj0, ok := wordToObj["expand-vertical"] + if !ok { + return nil, errors.New("context to layout.SpacerObject: expected context to have function ExpandVertical") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to layout.SpacerObject: context fn ExpandVertical: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ExpandVertical = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to layout.SpacerObject: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to layout.SpacerObject: context fn ExpandVertical: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["expand-horizontal"] + if !ok { + return nil, errors.New("context to layout.SpacerObject: expected context to have function ExpandHorizontal") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to layout.SpacerObject: context fn ExpandHorizontal: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ExpandHorizontal = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to layout.SpacerObject: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to layout.SpacerObject: context fn ExpandHorizontal: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_mobile_Device struct { + self env.RyeCtx + fn_ShowVirtualKeyboard func(self env.RyeCtx) + fn_ShowVirtualKeyboardType func(self env.RyeCtx, arg0 mobile.KeyboardType) + fn_HideVirtualKeyboard func(self env.RyeCtx) +} + +func (self *iface_mobile_Device) ShowVirtualKeyboard() { + self.fn_ShowVirtualKeyboard(self.self) +} + +func (self *iface_mobile_Device) ShowVirtualKeyboardType(arg0 mobile.KeyboardType) { + self.fn_ShowVirtualKeyboardType(self.self, arg0) +} + +func (self *iface_mobile_Device) HideVirtualKeyboard() { + self.fn_HideVirtualKeyboard(self.self) +} + +func ctxTo_mobile_Device(ps *env.ProgramState, v env.RyeCtx) (mobile.Device, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_mobile_Device{ + self: v, + } + ctxObj0, ok := wordToObj["show-virtual-keyboard"] + if !ok { + return nil, errors.New("context to mobile.Device: expected context to have function ShowVirtualKeyboard") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to mobile.Device: context fn ShowVirtualKeyboard: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ShowVirtualKeyboard = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to mobile.Device: context fn ShowVirtualKeyboard: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["show-virtual-keyboard-type"] + if !ok { + return nil, errors.New("context to mobile.Device: expected context to have function ShowVirtualKeyboardType") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to mobile.Device: context fn ShowVirtualKeyboardType: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ShowVirtualKeyboardType = func(ctx env.RyeCtx, farg0 mobile.KeyboardType) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(int32(farg0))) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to mobile.Device: context fn ShowVirtualKeyboardType: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["hide-virtual-keyboard"] + if !ok { + return nil, errors.New("context to mobile.Device: expected context to have function HideVirtualKeyboard") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to mobile.Device: context fn HideVirtualKeyboard: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_HideVirtualKeyboard = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to mobile.Device: context fn HideVirtualKeyboard: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_mobile_Driver struct { + self env.RyeCtx + fn_GoBack func(self env.RyeCtx) +} + +func (self *iface_mobile_Driver) GoBack() { + self.fn_GoBack(self.self) +} + +func ctxTo_mobile_Driver(ps *env.ProgramState, v env.RyeCtx) (mobile.Driver, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_mobile_Driver{ + self: v, + } + ctxObj0, ok := wordToObj["go-back"] + if !ok { + return nil, errors.New("context to mobile.Driver: expected context to have function GoBack") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to mobile.Driver: context fn GoBack: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_GoBack = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to mobile.Driver: context fn GoBack: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_mobile_Keyboardable struct { + self env.RyeCtx + fn_Keyboard func(self env.RyeCtx) mobile.KeyboardType + fn_FocusGained func(self env.RyeCtx) + fn_FocusLost func(self env.RyeCtx) + fn_TypedRune func(self env.RyeCtx, arg0 rune) + fn_TypedKey func(self env.RyeCtx, arg0 *fyne.KeyEvent) +} + +func (self *iface_mobile_Keyboardable) Keyboard() mobile.KeyboardType { + return self.fn_Keyboard(self.self) +} + +func (self *iface_mobile_Keyboardable) FocusGained() { + self.fn_FocusGained(self.self) +} + +func (self *iface_mobile_Keyboardable) FocusLost() { + self.fn_FocusLost(self.self) +} + +func (self *iface_mobile_Keyboardable) TypedRune(arg0 rune) { + self.fn_TypedRune(self.self, arg0) +} + +func (self *iface_mobile_Keyboardable) TypedKey(arg0 *fyne.KeyEvent) { + self.fn_TypedKey(self.self, arg0) +} + +func ctxTo_mobile_Keyboardable(ps *env.ProgramState, v env.RyeCtx) (mobile.Keyboardable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_mobile_Keyboardable{ + self: v, + } + ctxObj0, ok := wordToObj["keyboard"] + if !ok { + return nil, errors.New("context to mobile.Keyboardable: expected context to have function Keyboard") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to mobile.Keyboardable: context fn Keyboard: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Keyboard = func(ctx env.RyeCtx) mobile.KeyboardType { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res mobile.KeyboardType + { + nat, natOk := ps.Res.(env.Native) + var natValOk bool + var natVal mobile.KeyboardType + if natOk { + natVal, natValOk = nat.Value.(mobile.KeyboardType) + } + if natValOk { + res = natVal + } else { + var u int32 + if vc, ok := ps.Res.(env.Integer); ok { + u = int32(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to mobile.Keyboardable: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = mobile.KeyboardType(u) + } + } + return res + } + default: + return nil, errors.New("context to mobile.Keyboardable: context fn Keyboard: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["focus-gained"] + if !ok { + return nil, errors.New("context to mobile.Keyboardable: expected context to have function FocusGained") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to mobile.Keyboardable: context fn FocusGained: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FocusGained = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to mobile.Keyboardable: context fn FocusGained: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["focus-lost"] + if !ok { + return nil, errors.New("context to mobile.Keyboardable: expected context to have function FocusLost") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to mobile.Keyboardable: context fn FocusLost: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FocusLost = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to mobile.Keyboardable: context fn FocusLost: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["typed-rune"] + if !ok { + return nil, errors.New("context to mobile.Keyboardable: expected context to have function TypedRune") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to mobile.Keyboardable: context fn TypedRune: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TypedRune = func(ctx env.RyeCtx, farg0 rune) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to mobile.Keyboardable: context fn TypedRune: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["typed-key"] + if !ok { + return nil, errors.New("context to mobile.Keyboardable: expected context to have function TypedKey") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to mobile.Keyboardable: context fn TypedKey: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TypedKey = func(ctx env.RyeCtx, farg0 *fyne.KeyEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.KeyEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to mobile.Keyboardable: context fn TypedKey: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_mobile_Touchable struct { + self env.RyeCtx + fn_TouchDown func(self env.RyeCtx, arg0 *mobile.TouchEvent) + fn_TouchUp func(self env.RyeCtx, arg0 *mobile.TouchEvent) + fn_TouchCancel func(self env.RyeCtx, arg0 *mobile.TouchEvent) +} + +func (self *iface_mobile_Touchable) TouchDown(arg0 *mobile.TouchEvent) { + self.fn_TouchDown(self.self, arg0) +} + +func (self *iface_mobile_Touchable) TouchUp(arg0 *mobile.TouchEvent) { + self.fn_TouchUp(self.self, arg0) +} + +func (self *iface_mobile_Touchable) TouchCancel(arg0 *mobile.TouchEvent) { + self.fn_TouchCancel(self.self, arg0) +} + +func ctxTo_mobile_Touchable(ps *env.ProgramState, v env.RyeCtx) (mobile.Touchable, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_mobile_Touchable{ + self: v, + } + ctxObj0, ok := wordToObj["touch-down"] + if !ok { + return nil, errors.New("context to mobile.Touchable: expected context to have function TouchDown") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to mobile.Touchable: context fn TouchDown: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TouchDown = func(ctx env.RyeCtx, farg0 *mobile.TouchEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*mobile.TouchEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to mobile.Touchable: context fn TouchDown: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["touch-up"] + if !ok { + return nil, errors.New("context to mobile.Touchable: expected context to have function TouchUp") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to mobile.Touchable: context fn TouchUp: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TouchUp = func(ctx env.RyeCtx, farg0 *mobile.TouchEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*mobile.TouchEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to mobile.Touchable: context fn TouchUp: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["touch-cancel"] + if !ok { + return nil, errors.New("context to mobile.Touchable: expected context to have function TouchCancel") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to mobile.Touchable: context fn TouchCancel: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TouchCancel = func(ctx env.RyeCtx, farg0 *mobile.TouchEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*mobile.TouchEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to mobile.Touchable: context fn TouchCancel: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_repository_CopyableRepository struct { + self env.RyeCtx + fn_Copy func(self env.RyeCtx, arg0 fyne.URI, arg1 fyne.URI) error + fn_Exists func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_Reader func(self env.RyeCtx, arg0 fyne.URI) (fyne.URIReadCloser, error) + fn_CanRead func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_Destroy func(self env.RyeCtx, arg0 string) +} + +func (self *iface_repository_CopyableRepository) Copy(arg0 fyne.URI, arg1 fyne.URI) error { + return self.fn_Copy(self.self, arg0, arg1) +} + +func (self *iface_repository_CopyableRepository) Exists(arg0 fyne.URI) (bool, error) { + return self.fn_Exists(self.self, arg0) +} + +func (self *iface_repository_CopyableRepository) Reader(arg0 fyne.URI) (fyne.URIReadCloser, error) { + return self.fn_Reader(self.self, arg0) +} + +func (self *iface_repository_CopyableRepository) CanRead(arg0 fyne.URI) (bool, error) { + return self.fn_CanRead(self.self, arg0) +} + +func (self *iface_repository_CopyableRepository) Destroy(arg0 string) { + self.fn_Destroy(self.self, arg0) +} + +func ctxTo_repository_CopyableRepository(ps *env.ProgramState, v env.RyeCtx) (repository.CopyableRepository, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_repository_CopyableRepository{ + self: v, + } + ctxObj0, ok := wordToObj["copy"] + if !ok { + return nil, errors.New("context to repository.CopyableRepository: expected context to have function Copy") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to repository.CopyableRepository: context fn Copy: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Copy = func(ctx env.RyeCtx, farg0 fyne.URI, farg1 fyne.URI) error { + var farg0Val, farg1Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to repository.CopyableRepository: context fn Copy: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["exists"] + if !ok { + return nil, errors.New("context to repository.CopyableRepository: expected context to have function Exists") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.CopyableRepository: context fn Exists: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Exists = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.CopyableRepository: context fn Exists: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["reader"] + if !ok { + return nil, errors.New("context to repository.CopyableRepository: expected context to have function Reader") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.CopyableRepository: context fn Reader: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reader = func(ctx env.RyeCtx, farg0 fyne.URI) (fyne.URIReadCloser, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URIReadCloser + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URIReadCloser(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URIReadCloser); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected native of type fyne.URIReadCloser, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.CopyableRepository: context fn Reader: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["can-read"] + if !ok { + return nil, errors.New("context to repository.CopyableRepository: expected context to have function CanRead") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.CopyableRepository: context fn CanRead: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CanRead = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CopyableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.CopyableRepository: context fn CanRead: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["destroy"] + if !ok { + return nil, errors.New("context to repository.CopyableRepository: expected context to have function Destroy") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.CopyableRepository: context fn Destroy: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Destroy = func(ctx env.RyeCtx, farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to repository.CopyableRepository: context fn Destroy: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_repository_CustomURIRepository struct { + self env.RyeCtx + fn_ParseURI func(self env.RyeCtx, arg0 string) (fyne.URI, error) + fn_Exists func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_Reader func(self env.RyeCtx, arg0 fyne.URI) (fyne.URIReadCloser, error) + fn_CanRead func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_Destroy func(self env.RyeCtx, arg0 string) +} + +func (self *iface_repository_CustomURIRepository) ParseURI(arg0 string) (fyne.URI, error) { + return self.fn_ParseURI(self.self, arg0) +} + +func (self *iface_repository_CustomURIRepository) Exists(arg0 fyne.URI) (bool, error) { + return self.fn_Exists(self.self, arg0) +} + +func (self *iface_repository_CustomURIRepository) Reader(arg0 fyne.URI) (fyne.URIReadCloser, error) { + return self.fn_Reader(self.self, arg0) +} + +func (self *iface_repository_CustomURIRepository) CanRead(arg0 fyne.URI) (bool, error) { + return self.fn_CanRead(self.self, arg0) +} + +func (self *iface_repository_CustomURIRepository) Destroy(arg0 string) { + self.fn_Destroy(self.self, arg0) +} + +func ctxTo_repository_CustomURIRepository(ps *env.ProgramState, v env.RyeCtx) (repository.CustomURIRepository, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_repository_CustomURIRepository{ + self: v, + } + ctxObj0, ok := wordToObj["parse-uri"] + if !ok { + return nil, errors.New("context to repository.CustomURIRepository: expected context to have function ParseURI") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.CustomURIRepository: context fn ParseURI: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ParseURI = func(ctx env.RyeCtx, farg0 string) (fyne.URI, error) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URI + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.CustomURIRepository: context fn ParseURI: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["exists"] + if !ok { + return nil, errors.New("context to repository.CustomURIRepository: expected context to have function Exists") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.CustomURIRepository: context fn Exists: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Exists = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.CustomURIRepository: context fn Exists: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["reader"] + if !ok { + return nil, errors.New("context to repository.CustomURIRepository: expected context to have function Reader") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.CustomURIRepository: context fn Reader: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reader = func(ctx env.RyeCtx, farg0 fyne.URI) (fyne.URIReadCloser, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URIReadCloser + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URIReadCloser(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URIReadCloser); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected native of type fyne.URIReadCloser, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.CustomURIRepository: context fn Reader: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["can-read"] + if !ok { + return nil, errors.New("context to repository.CustomURIRepository: expected context to have function CanRead") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.CustomURIRepository: context fn CanRead: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CanRead = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.CustomURIRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.CustomURIRepository: context fn CanRead: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["destroy"] + if !ok { + return nil, errors.New("context to repository.CustomURIRepository: expected context to have function Destroy") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.CustomURIRepository: context fn Destroy: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Destroy = func(ctx env.RyeCtx, farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to repository.CustomURIRepository: context fn Destroy: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_repository_HierarchicalRepository struct { + self env.RyeCtx + fn_Parent func(self env.RyeCtx, arg0 fyne.URI) (fyne.URI, error) + fn_Child func(self env.RyeCtx, arg0 fyne.URI, arg1 string) (fyne.URI, error) + fn_Exists func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_Reader func(self env.RyeCtx, arg0 fyne.URI) (fyne.URIReadCloser, error) + fn_CanRead func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_Destroy func(self env.RyeCtx, arg0 string) +} + +func (self *iface_repository_HierarchicalRepository) Parent(arg0 fyne.URI) (fyne.URI, error) { + return self.fn_Parent(self.self, arg0) +} + +func (self *iface_repository_HierarchicalRepository) Child(arg0 fyne.URI, arg1 string) (fyne.URI, error) { + return self.fn_Child(self.self, arg0, arg1) +} + +func (self *iface_repository_HierarchicalRepository) Exists(arg0 fyne.URI) (bool, error) { + return self.fn_Exists(self.self, arg0) +} + +func (self *iface_repository_HierarchicalRepository) Reader(arg0 fyne.URI) (fyne.URIReadCloser, error) { + return self.fn_Reader(self.self, arg0) +} + +func (self *iface_repository_HierarchicalRepository) CanRead(arg0 fyne.URI) (bool, error) { + return self.fn_CanRead(self.self, arg0) +} + +func (self *iface_repository_HierarchicalRepository) Destroy(arg0 string) { + self.fn_Destroy(self.self, arg0) +} + +func ctxTo_repository_HierarchicalRepository(ps *env.ProgramState, v env.RyeCtx) (repository.HierarchicalRepository, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_repository_HierarchicalRepository{ + self: v, + } + ctxObj0, ok := wordToObj["parent"] + if !ok { + return nil, errors.New("context to repository.HierarchicalRepository: expected context to have function Parent") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.HierarchicalRepository: context fn Parent: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Parent = func(ctx env.RyeCtx, farg0 fyne.URI) (fyne.URI, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URI + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.HierarchicalRepository: context fn Parent: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["child"] + if !ok { + return nil, errors.New("context to repository.HierarchicalRepository: expected context to have function Child") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to repository.HierarchicalRepository: context fn Child: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Child = func(ctx env.RyeCtx, farg0 fyne.URI, farg1 string) (fyne.URI, error) { + var farg0Val, farg1Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + farg1Val = *env.NewString(farg1) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res0 fyne.URI + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.HierarchicalRepository: context fn Child: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["exists"] + if !ok { + return nil, errors.New("context to repository.HierarchicalRepository: expected context to have function Exists") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.HierarchicalRepository: context fn Exists: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Exists = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.HierarchicalRepository: context fn Exists: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["reader"] + if !ok { + return nil, errors.New("context to repository.HierarchicalRepository: expected context to have function Reader") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.HierarchicalRepository: context fn Reader: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reader = func(ctx env.RyeCtx, farg0 fyne.URI) (fyne.URIReadCloser, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URIReadCloser + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URIReadCloser(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URIReadCloser); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected native of type fyne.URIReadCloser, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.HierarchicalRepository: context fn Reader: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["can-read"] + if !ok { + return nil, errors.New("context to repository.HierarchicalRepository: expected context to have function CanRead") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.HierarchicalRepository: context fn CanRead: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CanRead = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.HierarchicalRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.HierarchicalRepository: context fn CanRead: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["destroy"] + if !ok { + return nil, errors.New("context to repository.HierarchicalRepository: expected context to have function Destroy") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.HierarchicalRepository: context fn Destroy: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Destroy = func(ctx env.RyeCtx, farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to repository.HierarchicalRepository: context fn Destroy: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_repository_ListableRepository struct { + self env.RyeCtx + fn_CanList func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_List func(self env.RyeCtx, arg0 fyne.URI) ([]fyne.URI, error) + fn_CreateListable func(self env.RyeCtx, arg0 fyne.URI) error + fn_Exists func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_Reader func(self env.RyeCtx, arg0 fyne.URI) (fyne.URIReadCloser, error) + fn_CanRead func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_Destroy func(self env.RyeCtx, arg0 string) +} + +func (self *iface_repository_ListableRepository) CanList(arg0 fyne.URI) (bool, error) { + return self.fn_CanList(self.self, arg0) +} + +func (self *iface_repository_ListableRepository) List(arg0 fyne.URI) ([]fyne.URI, error) { + return self.fn_List(self.self, arg0) +} + +func (self *iface_repository_ListableRepository) CreateListable(arg0 fyne.URI) error { + return self.fn_CreateListable(self.self, arg0) +} + +func (self *iface_repository_ListableRepository) Exists(arg0 fyne.URI) (bool, error) { + return self.fn_Exists(self.self, arg0) +} + +func (self *iface_repository_ListableRepository) Reader(arg0 fyne.URI) (fyne.URIReadCloser, error) { + return self.fn_Reader(self.self, arg0) +} + +func (self *iface_repository_ListableRepository) CanRead(arg0 fyne.URI) (bool, error) { + return self.fn_CanRead(self.self, arg0) +} + +func (self *iface_repository_ListableRepository) Destroy(arg0 string) { + self.fn_Destroy(self.self, arg0) +} + +func ctxTo_repository_ListableRepository(ps *env.ProgramState, v env.RyeCtx) (repository.ListableRepository, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_repository_ListableRepository{ + self: v, + } + ctxObj0, ok := wordToObj["can-list"] + if !ok { + return nil, errors.New("context to repository.ListableRepository: expected context to have function CanList") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.ListableRepository: context fn CanList: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CanList = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.ListableRepository: context fn CanList: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["list"] + if !ok { + return nil, errors.New("context to repository.ListableRepository: expected context to have function List") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.ListableRepository: context fn List: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_List = func(ctx env.RyeCtx, farg0 fyne.URI) ([]fyne.URI, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 []fyne.URI + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Block: + res0 = make([]fyne.URI, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res0[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"block item: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"block item: "+"expected native of type fyne.URI, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"block item: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + (*iv) = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"block item: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.ListableRepository: context fn List: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["create-listable"] + if !ok { + return nil, errors.New("context to repository.ListableRepository: expected context to have function CreateListable") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.ListableRepository: context fn CreateListable: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CreateListable = func(ctx env.RyeCtx, farg0 fyne.URI) error { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to repository.ListableRepository: context fn CreateListable: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["exists"] + if !ok { + return nil, errors.New("context to repository.ListableRepository: expected context to have function Exists") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.ListableRepository: context fn Exists: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Exists = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.ListableRepository: context fn Exists: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["reader"] + if !ok { + return nil, errors.New("context to repository.ListableRepository: expected context to have function Reader") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.ListableRepository: context fn Reader: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reader = func(ctx env.RyeCtx, farg0 fyne.URI) (fyne.URIReadCloser, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URIReadCloser + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URIReadCloser(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URIReadCloser); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected native of type fyne.URIReadCloser, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.ListableRepository: context fn Reader: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["can-read"] + if !ok { + return nil, errors.New("context to repository.ListableRepository: expected context to have function CanRead") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.ListableRepository: context fn CanRead: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CanRead = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.ListableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.ListableRepository: context fn CanRead: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["destroy"] + if !ok { + return nil, errors.New("context to repository.ListableRepository: expected context to have function Destroy") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.ListableRepository: context fn Destroy: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Destroy = func(ctx env.RyeCtx, farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to repository.ListableRepository: context fn Destroy: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_repository_MovableRepository struct { + self env.RyeCtx + fn_Move func(self env.RyeCtx, arg0 fyne.URI, arg1 fyne.URI) error + fn_Exists func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_Reader func(self env.RyeCtx, arg0 fyne.URI) (fyne.URIReadCloser, error) + fn_CanRead func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_Destroy func(self env.RyeCtx, arg0 string) +} + +func (self *iface_repository_MovableRepository) Move(arg0 fyne.URI, arg1 fyne.URI) error { + return self.fn_Move(self.self, arg0, arg1) +} + +func (self *iface_repository_MovableRepository) Exists(arg0 fyne.URI) (bool, error) { + return self.fn_Exists(self.self, arg0) +} + +func (self *iface_repository_MovableRepository) Reader(arg0 fyne.URI) (fyne.URIReadCloser, error) { + return self.fn_Reader(self.self, arg0) +} + +func (self *iface_repository_MovableRepository) CanRead(arg0 fyne.URI) (bool, error) { + return self.fn_CanRead(self.self, arg0) +} + +func (self *iface_repository_MovableRepository) Destroy(arg0 string) { + self.fn_Destroy(self.self, arg0) +} + +func ctxTo_repository_MovableRepository(ps *env.ProgramState, v env.RyeCtx) (repository.MovableRepository, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_repository_MovableRepository{ + self: v, + } + ctxObj0, ok := wordToObj["move"] + if !ok { + return nil, errors.New("context to repository.MovableRepository: expected context to have function Move") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to repository.MovableRepository: context fn Move: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Move = func(ctx env.RyeCtx, farg0 fyne.URI, farg1 fyne.URI) error { + var farg0Val, farg1Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to repository.MovableRepository: context fn Move: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["exists"] + if !ok { + return nil, errors.New("context to repository.MovableRepository: expected context to have function Exists") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.MovableRepository: context fn Exists: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Exists = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.MovableRepository: context fn Exists: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["reader"] + if !ok { + return nil, errors.New("context to repository.MovableRepository: expected context to have function Reader") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.MovableRepository: context fn Reader: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reader = func(ctx env.RyeCtx, farg0 fyne.URI) (fyne.URIReadCloser, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URIReadCloser + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URIReadCloser(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URIReadCloser); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected native of type fyne.URIReadCloser, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.MovableRepository: context fn Reader: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["can-read"] + if !ok { + return nil, errors.New("context to repository.MovableRepository: expected context to have function CanRead") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.MovableRepository: context fn CanRead: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CanRead = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.MovableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.MovableRepository: context fn CanRead: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["destroy"] + if !ok { + return nil, errors.New("context to repository.MovableRepository: expected context to have function Destroy") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.MovableRepository: context fn Destroy: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Destroy = func(ctx env.RyeCtx, farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to repository.MovableRepository: context fn Destroy: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_repository_Repository struct { + self env.RyeCtx + fn_Exists func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_Reader func(self env.RyeCtx, arg0 fyne.URI) (fyne.URIReadCloser, error) + fn_CanRead func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_Destroy func(self env.RyeCtx, arg0 string) +} + +func (self *iface_repository_Repository) Exists(arg0 fyne.URI) (bool, error) { + return self.fn_Exists(self.self, arg0) +} + +func (self *iface_repository_Repository) Reader(arg0 fyne.URI) (fyne.URIReadCloser, error) { + return self.fn_Reader(self.self, arg0) +} + +func (self *iface_repository_Repository) CanRead(arg0 fyne.URI) (bool, error) { + return self.fn_CanRead(self.self, arg0) +} + +func (self *iface_repository_Repository) Destroy(arg0 string) { + self.fn_Destroy(self.self, arg0) +} + +func ctxTo_repository_Repository(ps *env.ProgramState, v env.RyeCtx) (repository.Repository, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_repository_Repository{ + self: v, + } + ctxObj0, ok := wordToObj["exists"] + if !ok { + return nil, errors.New("context to repository.Repository: expected context to have function Exists") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.Repository: context fn Exists: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Exists = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.Repository: context fn Exists: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["reader"] + if !ok { + return nil, errors.New("context to repository.Repository: expected context to have function Reader") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.Repository: context fn Reader: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reader = func(ctx env.RyeCtx, farg0 fyne.URI) (fyne.URIReadCloser, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URIReadCloser + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URIReadCloser(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URIReadCloser); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected native of type fyne.URIReadCloser, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.Repository: context fn Reader: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["can-read"] + if !ok { + return nil, errors.New("context to repository.Repository: expected context to have function CanRead") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.Repository: context fn CanRead: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CanRead = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.Repository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.Repository: context fn CanRead: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["destroy"] + if !ok { + return nil, errors.New("context to repository.Repository: expected context to have function Destroy") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.Repository: context fn Destroy: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Destroy = func(ctx env.RyeCtx, farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to repository.Repository: context fn Destroy: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_repository_WritableRepository struct { + self env.RyeCtx + fn_Writer func(self env.RyeCtx, arg0 fyne.URI) (fyne.URIWriteCloser, error) + fn_CanWrite func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_Delete func(self env.RyeCtx, arg0 fyne.URI) error + fn_Exists func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_Reader func(self env.RyeCtx, arg0 fyne.URI) (fyne.URIReadCloser, error) + fn_CanRead func(self env.RyeCtx, arg0 fyne.URI) (bool, error) + fn_Destroy func(self env.RyeCtx, arg0 string) +} + +func (self *iface_repository_WritableRepository) Writer(arg0 fyne.URI) (fyne.URIWriteCloser, error) { + return self.fn_Writer(self.self, arg0) +} + +func (self *iface_repository_WritableRepository) CanWrite(arg0 fyne.URI) (bool, error) { + return self.fn_CanWrite(self.self, arg0) +} + +func (self *iface_repository_WritableRepository) Delete(arg0 fyne.URI) error { + return self.fn_Delete(self.self, arg0) +} + +func (self *iface_repository_WritableRepository) Exists(arg0 fyne.URI) (bool, error) { + return self.fn_Exists(self.self, arg0) +} + +func (self *iface_repository_WritableRepository) Reader(arg0 fyne.URI) (fyne.URIReadCloser, error) { + return self.fn_Reader(self.self, arg0) +} + +func (self *iface_repository_WritableRepository) CanRead(arg0 fyne.URI) (bool, error) { + return self.fn_CanRead(self.self, arg0) +} + +func (self *iface_repository_WritableRepository) Destroy(arg0 string) { + self.fn_Destroy(self.self, arg0) +} + +func ctxTo_repository_WritableRepository(ps *env.ProgramState, v env.RyeCtx) (repository.WritableRepository, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_repository_WritableRepository{ + self: v, + } + ctxObj0, ok := wordToObj["writer"] + if !ok { + return nil, errors.New("context to repository.WritableRepository: expected context to have function Writer") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.WritableRepository: context fn Writer: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Writer = func(ctx env.RyeCtx, farg0 fyne.URI) (fyne.URIWriteCloser, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URIWriteCloser + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URIWriteCloser(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWriteCloser); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected native of type fyne.URIWriteCloser, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.WritableRepository: context fn Writer: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["can-write"] + if !ok { + return nil, errors.New("context to repository.WritableRepository: expected context to have function CanWrite") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.WritableRepository: context fn CanWrite: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CanWrite = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.WritableRepository: context fn CanWrite: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["delete"] + if !ok { + return nil, errors.New("context to repository.WritableRepository: expected context to have function Delete") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.WritableRepository: context fn Delete: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Delete = func(ctx env.RyeCtx, farg0 fyne.URI) error { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to repository.WritableRepository: context fn Delete: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["exists"] + if !ok { + return nil, errors.New("context to repository.WritableRepository: expected context to have function Exists") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.WritableRepository: context fn Exists: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Exists = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.WritableRepository: context fn Exists: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["reader"] + if !ok { + return nil, errors.New("context to repository.WritableRepository: expected context to have function Reader") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.WritableRepository: context fn Reader: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Reader = func(ctx env.RyeCtx, farg0 fyne.URI) (fyne.URIReadCloser, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 fyne.URIReadCloser + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.RyeCtx: + var err error + res0, err = ctxTo_fyne_URIReadCloser(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Native: + if vc, ok := v.Value.(fyne.URIReadCloser); ok { + res0 = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected native of type fyne.URIReadCloser, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res0 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.WritableRepository: context fn Reader: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["can-read"] + if !ok { + return nil, errors.New("context to repository.WritableRepository: expected context to have function CanRead") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.WritableRepository: context fn CanRead: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_CanRead = func(ctx env.RyeCtx, farg0 fyne.URI) (bool, error) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 bool + var res1 error + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.String: + res1 = errors.New(v.Value) + case env.Error: + res1 = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + res1 = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to repository.WritableRepository: arg 0: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to repository.WritableRepository: context fn CanRead: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["destroy"] + if !ok { + return nil, errors.New("context to repository.WritableRepository: expected context to have function Destroy") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to repository.WritableRepository: context fn Destroy: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Destroy = func(ctx env.RyeCtx, farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to repository.WritableRepository: context fn Destroy: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_storage_FileFilter struct { + self env.RyeCtx + fn_Matches func(self env.RyeCtx, arg0 fyne.URI) bool +} + +func (self *iface_storage_FileFilter) Matches(arg0 fyne.URI) bool { + return self.fn_Matches(self.self, arg0) +} + +func ctxTo_storage_FileFilter(ps *env.ProgramState, v env.RyeCtx) (storage.FileFilter, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_storage_FileFilter{ + self: v, + } + ctxObj0, ok := wordToObj["matches"] + if !ok { + return nil, errors.New("context to storage.FileFilter: expected context to have function Matches") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to storage.FileFilter: context fn Matches: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Matches = func(ctx env.RyeCtx, farg0 fyne.URI) bool { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URI)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to storage.FileFilter: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to storage.FileFilter: context fn Matches: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_test_SoftwarePainter struct { + self env.RyeCtx + fn_Paint func(self env.RyeCtx, arg0 fyne.Canvas) image.Image +} + +func (self *iface_test_SoftwarePainter) Paint(arg0 fyne.Canvas) image.Image { + return self.fn_Paint(self.self, arg0) +} + +func ctxTo_test_SoftwarePainter(ps *env.ProgramState, v env.RyeCtx) (test.SoftwarePainter, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_test_SoftwarePainter{ + self: v, + } + ctxObj0, ok := wordToObj["paint"] + if !ok { + return nil, errors.New("context to test.SoftwarePainter: expected context to have function Paint") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to test.SoftwarePainter: context fn Paint: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Paint = func(ctx env.RyeCtx, farg0 fyne.Canvas) image.Image { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Canvas)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res image.Image + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(image.Image); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.SoftwarePainter: arg 0: callback result: "+"expected native of type image.Image, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.SoftwarePainter: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to test.SoftwarePainter: context fn Paint: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_test_WindowlessCanvas struct { + self env.RyeCtx + fn_Padded func(self env.RyeCtx) bool + fn_Resize func(self env.RyeCtx, arg0 fyne.Size) + fn_SetPadded func(self env.RyeCtx, arg0 bool) + fn_SetScale func(self env.RyeCtx, arg0 float32) + fn_Content func(self env.RyeCtx) fyne.CanvasObject + fn_SetContent func(self env.RyeCtx, arg0 fyne.CanvasObject) + fn_Refresh func(self env.RyeCtx, arg0 fyne.CanvasObject) + fn_Focus func(self env.RyeCtx, arg0 fyne.Focusable) + fn_FocusNext func(self env.RyeCtx) + fn_FocusPrevious func(self env.RyeCtx) + fn_Unfocus func(self env.RyeCtx) + fn_Focused func(self env.RyeCtx) fyne.Focusable + fn_Size func(self env.RyeCtx) fyne.Size + fn_Scale func(self env.RyeCtx) float32 + fn_Overlays func(self env.RyeCtx) fyne.OverlayStack + fn_OnTypedRune func(self env.RyeCtx) func(rune) + fn_SetOnTypedRune func(self env.RyeCtx, arg0 func(rune)) + fn_OnTypedKey func(self env.RyeCtx) func(*fyne.KeyEvent) + fn_SetOnTypedKey func(self env.RyeCtx, arg0 func(*fyne.KeyEvent)) + fn_AddShortcut func(self env.RyeCtx, arg0 fyne.Shortcut, arg1 func(fyne.Shortcut)) + fn_RemoveShortcut func(self env.RyeCtx, arg0 fyne.Shortcut) + fn_Capture func(self env.RyeCtx) image.Image + fn_PixelCoordinateForPosition func(self env.RyeCtx, arg0 fyne.Position) (int, int) + fn_InteractiveArea func(self env.RyeCtx) (fyne.Position, fyne.Size) +} + +func (self *iface_test_WindowlessCanvas) Padded() bool { + return self.fn_Padded(self.self) +} + +func (self *iface_test_WindowlessCanvas) Resize(arg0 fyne.Size) { + self.fn_Resize(self.self, arg0) +} + +func (self *iface_test_WindowlessCanvas) SetPadded(arg0 bool) { + self.fn_SetPadded(self.self, arg0) +} + +func (self *iface_test_WindowlessCanvas) SetScale(arg0 float32) { + self.fn_SetScale(self.self, arg0) +} + +func (self *iface_test_WindowlessCanvas) Content() fyne.CanvasObject { + return self.fn_Content(self.self) +} + +func (self *iface_test_WindowlessCanvas) SetContent(arg0 fyne.CanvasObject) { + self.fn_SetContent(self.self, arg0) +} + +func (self *iface_test_WindowlessCanvas) Refresh(arg0 fyne.CanvasObject) { + self.fn_Refresh(self.self, arg0) +} + +func (self *iface_test_WindowlessCanvas) Focus(arg0 fyne.Focusable) { + self.fn_Focus(self.self, arg0) +} + +func (self *iface_test_WindowlessCanvas) FocusNext() { + self.fn_FocusNext(self.self) +} + +func (self *iface_test_WindowlessCanvas) FocusPrevious() { + self.fn_FocusPrevious(self.self) +} + +func (self *iface_test_WindowlessCanvas) Unfocus() { + self.fn_Unfocus(self.self) +} + +func (self *iface_test_WindowlessCanvas) Focused() fyne.Focusable { + return self.fn_Focused(self.self) +} + +func (self *iface_test_WindowlessCanvas) Size() fyne.Size { + return self.fn_Size(self.self) +} + +func (self *iface_test_WindowlessCanvas) Scale() float32 { + return self.fn_Scale(self.self) +} + +func (self *iface_test_WindowlessCanvas) Overlays() fyne.OverlayStack { + return self.fn_Overlays(self.self) +} + +func (self *iface_test_WindowlessCanvas) OnTypedRune() func(rune) { + return self.fn_OnTypedRune(self.self) +} + +func (self *iface_test_WindowlessCanvas) SetOnTypedRune(arg0 func(rune)) { + self.fn_SetOnTypedRune(self.self, arg0) +} + +func (self *iface_test_WindowlessCanvas) OnTypedKey() func(*fyne.KeyEvent) { + return self.fn_OnTypedKey(self.self) +} + +func (self *iface_test_WindowlessCanvas) SetOnTypedKey(arg0 func(*fyne.KeyEvent)) { + self.fn_SetOnTypedKey(self.self, arg0) +} + +func (self *iface_test_WindowlessCanvas) AddShortcut(arg0 fyne.Shortcut, arg1 func(fyne.Shortcut)) { + self.fn_AddShortcut(self.self, arg0, arg1) +} + +func (self *iface_test_WindowlessCanvas) RemoveShortcut(arg0 fyne.Shortcut) { + self.fn_RemoveShortcut(self.self, arg0) +} + +func (self *iface_test_WindowlessCanvas) Capture() image.Image { + return self.fn_Capture(self.self) +} + +func (self *iface_test_WindowlessCanvas) PixelCoordinateForPosition(arg0 fyne.Position) (int, int) { + return self.fn_PixelCoordinateForPosition(self.self, arg0) +} + +func (self *iface_test_WindowlessCanvas) InteractiveArea() (fyne.Position, fyne.Size) { + return self.fn_InteractiveArea(self.self) +} + +func ctxTo_test_WindowlessCanvas(ps *env.ProgramState, v env.RyeCtx) (test.WindowlessCanvas, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_test_WindowlessCanvas{ + self: v, + } + ctxObj0, ok := wordToObj["padded"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function Padded") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to test.WindowlessCanvas: context fn Padded: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Padded = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn Padded: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["resize"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function Resize") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to test.WindowlessCanvas: context fn Resize: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Resize = func(ctx env.RyeCtx, farg0 fyne.Size) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*fyne.Size)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn Resize: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["set-padded"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function SetPadded") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to test.WindowlessCanvas: context fn SetPadded: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetPadded = func(ctx env.RyeCtx, farg0 bool) { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn SetPadded: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["set-scale"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function SetScale") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to test.WindowlessCanvas: context fn SetScale: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetScale = func(ctx env.RyeCtx, farg0 float32) { + var farg0Val env.Object + farg0Val = *env.NewDecimal(float64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn SetScale: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["content"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function Content") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to test.WindowlessCanvas: context fn Content: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Content = func(ctx env.RyeCtx) fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn Content: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["set-content"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function SetContent") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to test.WindowlessCanvas: context fn SetContent: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetContent = func(ctx env.RyeCtx, farg0 fyne.CanvasObject) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn SetContent: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["refresh"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function Refresh") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to test.WindowlessCanvas: context fn Refresh: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Refresh = func(ctx env.RyeCtx, farg0 fyne.CanvasObject) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn Refresh: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj7, ok := wordToObj["focus"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function Focus") + } + switch fn := ctxObj7.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to test.WindowlessCanvas: context fn Focus: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Focus = func(ctx env.RyeCtx, farg0 fyne.Focusable) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Focusable)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn Focus: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj8, ok := wordToObj["focus-next"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function FocusNext") + } + switch fn := ctxObj8.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to test.WindowlessCanvas: context fn FocusNext: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FocusNext = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn FocusNext: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj9, ok := wordToObj["focus-previous"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function FocusPrevious") + } + switch fn := ctxObj9.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to test.WindowlessCanvas: context fn FocusPrevious: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_FocusPrevious = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn FocusPrevious: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj10, ok := wordToObj["unfocus"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function Unfocus") + } + switch fn := ctxObj10.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to test.WindowlessCanvas: context fn Unfocus: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Unfocus = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn Unfocus: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj11, ok := wordToObj["focused"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function Focused") + } + switch fn := ctxObj11.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to test.WindowlessCanvas: context fn Focused: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Focused = func(ctx env.RyeCtx) fyne.Focusable { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Focusable + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_Focusable(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.Focusable); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected native of type fyne.Focusable, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn Focused: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj12, ok := wordToObj["size"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function Size") + } + switch fn := ctxObj12.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to test.WindowlessCanvas: context fn Size: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Size = func(ctx env.RyeCtx) fyne.Size { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.Size + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + res = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected native of type *fyne.Size, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn Size: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj13, ok := wordToObj["scale"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function Scale") + } + switch fn := ctxObj13.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to test.WindowlessCanvas: context fn Scale: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Scale = func(ctx env.RyeCtx) float32 { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res float32 + if vc, ok := ps.Res.(env.Decimal); ok { + res = float32(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn Scale: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj14, ok := wordToObj["overlays"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function Overlays") + } + switch fn := ctxObj14.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to test.WindowlessCanvas: context fn Overlays: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Overlays = func(ctx env.RyeCtx) fyne.OverlayStack { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.OverlayStack + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_OverlayStack(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.OverlayStack); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected native of type fyne.OverlayStack, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn Overlays: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj15, ok := wordToObj["on-typed-rune"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function OnTypedRune") + } + switch fn := ctxObj15.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to test.WindowlessCanvas: context fn OnTypedRune: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_OnTypedRune = func(ctx env.RyeCtx) func(rune) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res func(rune) + switch fn := ps.Res.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected 1 function arguments, but got "+strconv.Itoa(fn.Argsn), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = func(farg0 rune) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(fn.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected function or nil, but got "+objectDebugString(ps.Idx, fn), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn OnTypedRune: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj16, ok := wordToObj["set-on-typed-rune"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function SetOnTypedRune") + } + switch fn := ctxObj16.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to test.WindowlessCanvas: context fn SetOnTypedRune: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetOnTypedRune = func(ctx env.RyeCtx, farg0 func(rune)) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val rune + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("context to test.WindowlessCanvas: arg 1: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("context to test.WindowlessCanvas: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + farg0(arg0Val) + return nil + }, 1, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn SetOnTypedRune: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj17, ok := wordToObj["on-typed-key"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function OnTypedKey") + } + switch fn := ctxObj17.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to test.WindowlessCanvas: context fn OnTypedKey: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_OnTypedKey = func(ctx env.RyeCtx) func(*fyne.KeyEvent) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res func(*fyne.KeyEvent) + switch fn := ps.Res.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected 1 function arguments, but got "+strconv.Itoa(fn.Argsn), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = func(farg0 *fyne.KeyEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.KeyEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(fn.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected function or nil, but got "+objectDebugString(ps.Idx, fn), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn OnTypedKey: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj18, ok := wordToObj["set-on-typed-key"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function SetOnTypedKey") + } + switch fn := ctxObj18.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to test.WindowlessCanvas: context fn SetOnTypedKey: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SetOnTypedKey = func(ctx env.RyeCtx, farg0 func(*fyne.KeyEvent)) { + var farg0Val env.Object + farg0Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.KeyEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("context to test.WindowlessCanvas: arg 1: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("context to test.WindowlessCanvas: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("context to test.WindowlessCanvas: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + farg0(arg0Val) + return nil + }, 1, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn SetOnTypedKey: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj19, ok := wordToObj["add-shortcut"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function AddShortcut") + } + switch fn := ctxObj19.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to test.WindowlessCanvas: context fn AddShortcut: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_AddShortcut = func(ctx env.RyeCtx, farg0 fyne.Shortcut, farg1 func(fyne.Shortcut)) { + var farg0Val, farg1Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Shortcut)") + farg1Val = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Shortcut + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Shortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("context to test.WindowlessCanvas: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Shortcut); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("context to test.WindowlessCanvas: arg 1: " + "expected native of type fyne.Shortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("context to test.WindowlessCanvas: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("context to test.WindowlessCanvas: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + farg1(arg0Val) + return nil + }, 1, false, false, "Returned func") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn AddShortcut: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj20, ok := wordToObj["remove-shortcut"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function RemoveShortcut") + } + switch fn := ctxObj20.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to test.WindowlessCanvas: context fn RemoveShortcut: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_RemoveShortcut = func(ctx env.RyeCtx, farg0 fyne.Shortcut) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Shortcut)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn RemoveShortcut: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj21, ok := wordToObj["capture"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function Capture") + } + switch fn := ctxObj21.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to test.WindowlessCanvas: context fn Capture: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Capture = func(ctx env.RyeCtx) image.Image { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res image.Image + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(image.Image); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected native of type image.Image, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn Capture: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj22, ok := wordToObj["pixel-coordinate-for-position"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function PixelCoordinateForPosition") + } + switch fn := ctxObj22.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to test.WindowlessCanvas: context fn PixelCoordinateForPosition: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_PixelCoordinateForPosition = func(ctx env.RyeCtx, farg0 fyne.Position) (int, int) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*fyne.Position)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res0 int + var res1 int + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[1].(env.Integer); ok { + res1 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn PixelCoordinateForPosition: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj23, ok := wordToObj["interactive-area"] + if !ok { + return nil, errors.New("context to test.WindowlessCanvas: expected context to have function InteractiveArea") + } + switch fn := ctxObj23.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to test.WindowlessCanvas: context fn InteractiveArea: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_InteractiveArea = func(ctx env.RyeCtx) (fyne.Position, fyne.Size) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 fyne.Position + var res1 fyne.Size + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[0].(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + res0 = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected native of type *fyne.Position, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + switch v := res.Series.S[1].(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + res1 = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected native of type *fyne.Size, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to test.WindowlessCanvas: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + default: + return nil, errors.New("context to test.WindowlessCanvas: context fn InteractiveArea: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_widget_RichTextBlock struct { + self env.RyeCtx + fn_Segments func(self env.RyeCtx) []widget.RichTextSegment +} + +func (self *iface_widget_RichTextBlock) Segments() []widget.RichTextSegment { + return self.fn_Segments(self.self) +} + +func ctxTo_widget_RichTextBlock(ps *env.ProgramState, v env.RyeCtx) (widget.RichTextBlock, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_widget_RichTextBlock{ + self: v, + } + ctxObj0, ok := wordToObj["segments"] + if !ok { + return nil, errors.New("context to widget.RichTextBlock: expected context to have function Segments") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to widget.RichTextBlock: context fn Segments: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Segments = func(ctx env.RyeCtx) []widget.RichTextSegment { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res []widget.RichTextSegment + switch v := ps.Res.(type) { + case env.Block: + res = make([]widget.RichTextSegment, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_widget_RichTextSegment(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.RichTextBlock: arg 0: callback result: "+"block item: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(widget.RichTextSegment); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.RichTextBlock: arg 0: callback result: "+"block item: "+"expected native of type widget.RichTextSegment, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.RichTextBlock: arg 0: callback result: "+"block item: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + (*iv) = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.RichTextBlock: arg 0: callback result: "+"block item: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.RichTextBlock: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.RichTextBlock: arg 0: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to widget.RichTextBlock: context fn Segments: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_widget_RichTextSegment struct { + self env.RyeCtx + fn_Inline func(self env.RyeCtx) bool + fn_Textual func(self env.RyeCtx) string + fn_Update func(self env.RyeCtx, arg0 fyne.CanvasObject) + fn_Visual func(self env.RyeCtx) fyne.CanvasObject + fn_Select func(self env.RyeCtx, arg0 fyne.Position, arg1 fyne.Position) + fn_SelectedText func(self env.RyeCtx) string + fn_Unselect func(self env.RyeCtx) +} + +func (self *iface_widget_RichTextSegment) Inline() bool { + return self.fn_Inline(self.self) +} + +func (self *iface_widget_RichTextSegment) Textual() string { + return self.fn_Textual(self.self) +} + +func (self *iface_widget_RichTextSegment) Update(arg0 fyne.CanvasObject) { + self.fn_Update(self.self, arg0) +} + +func (self *iface_widget_RichTextSegment) Visual() fyne.CanvasObject { + return self.fn_Visual(self.self) +} + +func (self *iface_widget_RichTextSegment) Select(arg0 fyne.Position, arg1 fyne.Position) { + self.fn_Select(self.self, arg0, arg1) +} + +func (self *iface_widget_RichTextSegment) SelectedText() string { + return self.fn_SelectedText(self.self) +} + +func (self *iface_widget_RichTextSegment) Unselect() { + self.fn_Unselect(self.self) +} + +func ctxTo_widget_RichTextSegment(ps *env.ProgramState, v env.RyeCtx) (widget.RichTextSegment, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_widget_RichTextSegment{ + self: v, + } + ctxObj0, ok := wordToObj["inline"] + if !ok { + return nil, errors.New("context to widget.RichTextSegment: expected context to have function Inline") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to widget.RichTextSegment: context fn Inline: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Inline = func(ctx env.RyeCtx) bool { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.RichTextSegment: arg 0: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to widget.RichTextSegment: context fn Inline: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["textual"] + if !ok { + return nil, errors.New("context to widget.RichTextSegment: expected context to have function Textual") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to widget.RichTextSegment: context fn Textual: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Textual = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.RichTextSegment: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to widget.RichTextSegment: context fn Textual: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["update"] + if !ok { + return nil, errors.New("context to widget.RichTextSegment: expected context to have function Update") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 1 { + return nil, errors.New("context to widget.RichTextSegment: context fn Update: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Update = func(ctx env.RyeCtx, farg0 fyne.CanvasObject) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + default: + return nil, errors.New("context to widget.RichTextSegment: context fn Update: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj3, ok := wordToObj["visual"] + if !ok { + return nil, errors.New("context to widget.RichTextSegment: expected context to have function Visual") + } + switch fn := ctxObj3.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to widget.RichTextSegment: context fn Visual: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Visual = func(ctx env.RyeCtx) fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.RichTextSegment: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.RichTextSegment: arg 0: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.RichTextSegment: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.RichTextSegment: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to widget.RichTextSegment: context fn Visual: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj4, ok := wordToObj["select"] + if !ok { + return nil, errors.New("context to widget.RichTextSegment: expected context to have function Select") + } + switch fn := ctxObj4.(type) { + case env.Function: + if fn.Argsn != 2 { + return nil, errors.New("context to widget.RichTextSegment: context fn Select: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Select = func(ctx env.RyeCtx, farg0 fyne.Position, farg1 fyne.Position) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*fyne.Position)") + farg1Val = *env.NewNative(ps.Idx, &farg1, "Go(*fyne.Position)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + default: + return nil, errors.New("context to widget.RichTextSegment: context fn Select: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj5, ok := wordToObj["selected-text"] + if !ok { + return nil, errors.New("context to widget.RichTextSegment: expected context to have function SelectedText") + } + switch fn := ctxObj5.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to widget.RichTextSegment: context fn SelectedText: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_SelectedText = func(ctx env.RyeCtx) string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.RichTextSegment: arg 0: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to widget.RichTextSegment: context fn SelectedText: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj6, ok := wordToObj["unselect"] + if !ok { + return nil, errors.New("context to widget.RichTextSegment: expected context to have function Unselect") + } + switch fn := ctxObj6.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to widget.RichTextSegment: context fn Unselect: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Unselect = func(ctx env.RyeCtx) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + default: + return nil, errors.New("context to widget.RichTextSegment: context fn Unselect: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_widget_TextGridStyle struct { + self env.RyeCtx + fn_Style func(self env.RyeCtx) fyne.TextStyle + fn_TextColor func(self env.RyeCtx) color.Color + fn_BackgroundColor func(self env.RyeCtx) color.Color +} + +func (self *iface_widget_TextGridStyle) Style() fyne.TextStyle { + return self.fn_Style(self.self) +} + +func (self *iface_widget_TextGridStyle) TextColor() color.Color { + return self.fn_TextColor(self.self) +} + +func (self *iface_widget_TextGridStyle) BackgroundColor() color.Color { + return self.fn_BackgroundColor(self.self) +} + +func ctxTo_widget_TextGridStyle(ps *env.ProgramState, v env.RyeCtx) (widget.TextGridStyle, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_widget_TextGridStyle{ + self: v, + } + ctxObj0, ok := wordToObj["style"] + if !ok { + return nil, errors.New("context to widget.TextGridStyle: expected context to have function Style") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to widget.TextGridStyle: context fn Style: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_Style = func(ctx env.RyeCtx) fyne.TextStyle { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.TextStyle + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + res = *vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.TextGridStyle: arg 0: callback result: "+"expected native of type *fyne.TextStyle, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.TextGridStyle: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to widget.TextGridStyle: context fn Style: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj1, ok := wordToObj["text-color"] + if !ok { + return nil, errors.New("context to widget.TextGridStyle: expected context to have function TextColor") + } + switch fn := ctxObj1.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to widget.TextGridStyle: context fn TextColor: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_TextColor = func(ctx env.RyeCtx) color.Color { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res color.Color + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.TextGridStyle: arg 0: callback result: "+"expected native of type color.Color, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.TextGridStyle: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to widget.TextGridStyle: context fn TextColor: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + ctxObj2, ok := wordToObj["background-color"] + if !ok { + return nil, errors.New("context to widget.TextGridStyle: expected context to have function BackgroundColor") + } + switch fn := ctxObj2.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to widget.TextGridStyle: context fn BackgroundColor: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_BackgroundColor = func(ctx env.RyeCtx) color.Color { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res color.Color + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.TextGridStyle: arg 0: callback result: "+"expected native of type color.Color, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.TextGridStyle: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to widget.TextGridStyle: context fn BackgroundColor: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +type iface_widget_ToolbarItem struct { + self env.RyeCtx + fn_ToolbarObject func(self env.RyeCtx) fyne.CanvasObject +} + +func (self *iface_widget_ToolbarItem) ToolbarObject() fyne.CanvasObject { + return self.fn_ToolbarObject(self.self) +} + +func ctxTo_widget_ToolbarItem(ps *env.ProgramState, v env.RyeCtx) (widget.ToolbarItem, error) { + words := v.GetWords(*ps.Idx).Series.S + wordToObj := make(map[string]env.Object, len(words)) + for _, word := range words { + name := word.(env.String).Value + idx, ok := ps.Idx.GetIndex(name) + if !ok { + panic("expected valid word") + } + obj, ok := v.Get(idx) + if !ok { + panic("expected valid index") + } + wordToObj[name] = obj + } + impl := &iface_widget_ToolbarItem{ + self: v, + } + ctxObj0, ok := wordToObj["toolbar-object"] + if !ok { + return nil, errors.New("context to widget.ToolbarItem: expected context to have function ToolbarObject") + } + switch fn := ctxObj0.(type) { + case env.Function: + if fn.Argsn != 0 { + return nil, errors.New("context to widget.ToolbarItem: context fn ToolbarObject: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + impl.fn_ToolbarObject = func(ctx env.RyeCtx) fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.ToolbarItem: arg 0: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.ToolbarItem: arg 0: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.ToolbarItem: arg 0: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "context to widget.ToolbarItem: arg 0: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + default: + return nil, errors.New("context to widget.ToolbarItem: context fn ToolbarObject: " + "expected function, but got " + objectDebugString(ps.Idx, fn)) + } + return impl, nil +} + +var builtinsGenerated = map[string]*env.Builtin{ + // Args: + // * cloud-config - string + // Result: + // * string + "Go(*app.SettingsSchema)//cloud-config!": { + Doc: "Set *app.SettingsSchema CloudConfig value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *app.SettingsSchema + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*app.SettingsSchema); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//cloud-config!: arg 1: " + "expected native of type *app.SettingsSchema, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//cloud-config!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//cloud-config!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//cloud-config!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.CloudConfig = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*app.SettingsSchema)//cloud-config?": { + Doc: "Get *app.SettingsSchema CloudConfig value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *app.SettingsSchema + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*app.SettingsSchema); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//cloud-config?: arg 1: " + "expected native of type *app.SettingsSchema, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//cloud-config?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//cloud-config?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.CloudConfig) + return resObj + }, + }, + // Args: + // * cloud-name - string + // Result: + // * string + "Go(*app.SettingsSchema)//cloud-name!": { + Doc: "Set *app.SettingsSchema CloudName value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *app.SettingsSchema + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*app.SettingsSchema); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//cloud-name!: arg 1: " + "expected native of type *app.SettingsSchema, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//cloud-name!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//cloud-name!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//cloud-name!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.CloudName = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*app.SettingsSchema)//cloud-name?": { + Doc: "Get *app.SettingsSchema CloudName value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *app.SettingsSchema + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*app.SettingsSchema); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//cloud-name?: arg 1: " + "expected native of type *app.SettingsSchema, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//cloud-name?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//cloud-name?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.CloudName) + return resObj + }, + }, + // Args: + // * disable-animations - bool + // Result: + // * bool + "Go(*app.SettingsSchema)//disable-animations!": { + Doc: "Set *app.SettingsSchema DisableAnimations value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *app.SettingsSchema + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*app.SettingsSchema); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//disable-animations!: arg 1: " + "expected native of type *app.SettingsSchema, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//disable-animations!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//disable-animations!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//disable-animations!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.DisableAnimations = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*app.SettingsSchema)//disable-animations?": { + Doc: "Get *app.SettingsSchema DisableAnimations value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *app.SettingsSchema + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*app.SettingsSchema); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//disable-animations?: arg 1: " + "expected native of type *app.SettingsSchema, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//disable-animations?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//disable-animations?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.DisableAnimations)) + return resObj + }, + }, + // Args: + // * primary-color - string + // Result: + // * string + "Go(*app.SettingsSchema)//primary-color!": { + Doc: "Set *app.SettingsSchema PrimaryColor value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *app.SettingsSchema + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*app.SettingsSchema); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//primary-color!: arg 1: " + "expected native of type *app.SettingsSchema, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//primary-color!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//primary-color!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//primary-color!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.PrimaryColor = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*app.SettingsSchema)//primary-color?": { + Doc: "Get *app.SettingsSchema PrimaryColor value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *app.SettingsSchema + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*app.SettingsSchema); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//primary-color?: arg 1: " + "expected native of type *app.SettingsSchema, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//primary-color?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//primary-color?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.PrimaryColor) + return resObj + }, + }, + // Args: + // * scale - decimal + // Result: + // * decimal + "Go(*app.SettingsSchema)//scale!": { + Doc: "Set *app.SettingsSchema Scale value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *app.SettingsSchema + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*app.SettingsSchema); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//scale!: arg 1: " + "expected native of type *app.SettingsSchema, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//scale!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//scale!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//scale!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Scale = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*app.SettingsSchema)//scale?": { + Doc: "Get *app.SettingsSchema Scale value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *app.SettingsSchema + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*app.SettingsSchema); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//scale?: arg 1: " + "expected native of type *app.SettingsSchema, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//scale?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//scale?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.Scale)) + return resObj + }, + }, + // storage-path returns the location of the settings storage + // + // Args: + // * recv - Go(*app.SettingsSchema) + // Result: + // * string + "Go(*app.SettingsSchema)//storage-path": { + Doc: "(*app.SettingsSchema).StoragePath", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *app.SettingsSchema + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*app.SettingsSchema); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//storage-path: arg 1: " + "expected native of type *app.SettingsSchema, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//storage-path: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//storage-path: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.StoragePath() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * theme-name - string + // Result: + // * string + "Go(*app.SettingsSchema)//theme-name!": { + Doc: "Set *app.SettingsSchema ThemeName value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *app.SettingsSchema + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*app.SettingsSchema); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//theme-name!: arg 1: " + "expected native of type *app.SettingsSchema, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//theme-name!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//theme-name!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//theme-name!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.ThemeName = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*app.SettingsSchema)//theme-name?": { + Doc: "Get *app.SettingsSchema ThemeName value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *app.SettingsSchema + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*app.SettingsSchema); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//theme-name?: arg 1: " + "expected native of type *app.SettingsSchema, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//theme-name?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*app.SettingsSchema)//theme-name?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.ThemeName) + return resObj + }, + }, + // Args: + // * fill-color - Go(color.Color) + // Result: + // * Go(color.Color) + "Go(*canvas.Circle)//fill-color!": { + Doc: "Set *canvas.Circle FillColor value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//fill-color!: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//fill-color!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//fill-color!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//fill-color!: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//fill-color!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.FillColor = newVal + return arg0 + }, + }, + // Result: + // * Go(color.Color) + "Go(*canvas.Circle)//fill-color?": { + Doc: "Get *canvas.Circle FillColor value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//fill-color?: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//fill-color?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//fill-color?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.FillColor, "Go(color.Color)") + return resObj + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*canvas.Circle)//hidden!": { + Doc: "Set *canvas.Circle Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//hidden!: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*canvas.Circle)//hidden?": { + Doc: "Get *canvas.Circle Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//hidden?: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // hide will set this circle to not be visible + // + // Args: + // * recv - Go(*canvas.Circle) + "Go(*canvas.Circle)//hide": { + Doc: "(*canvas.Circle).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//hide: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size for a Circle simply returns Size{1, 1} as there is no + // explicit content + // + // Args: + // * recv - Go(*canvas.Circle) + // Result: + // * Go(fyne.Size) + "Go(*canvas.Circle)//min-size": { + Doc: "(*canvas.Circle).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//min-size: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // move the circle object to a new position, relative to its parent / canvas + // + // Args: + // * recv - Go(*canvas.Circle) + // * pos - Go(fyne.Position) + "Go(*canvas.Circle)//move": { + Doc: "(*canvas.Circle).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//move: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // position gets the current top-left position of this circle object, relative to its parent / canvas + // + // Args: + // * recv - Go(*canvas.Circle) + // Result: + // * Go(fyne.position) + "Go(*canvas.Circle)//position": { + Doc: "(*canvas.Circle).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * position-1 - Go(fyne.Position) + // Result: + // * Go(fyne.Position) + "Go(*canvas.Circle)//position-1!": { + Doc: "Set *canvas.Circle Position1 value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-1!: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-1!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-1!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-1!: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-1!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-1!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Position1 = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Position) + "Go(*canvas.Circle)//position-1?": { + Doc: "Get *canvas.Circle Position1 value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-1?: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-1?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-1?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.Position1, "Go(*fyne.Position)") + return resObj + }, + }, + // Args: + // * position-2 - Go(fyne.Position) + // Result: + // * Go(fyne.Position) + "Go(*canvas.Circle)//position-2!": { + Doc: "Set *canvas.Circle Position2 value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-2!: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-2!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-2!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-2!: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-2!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-2!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Position2 = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Position) + "Go(*canvas.Circle)//position-2?": { + Doc: "Get *canvas.Circle Position2 value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-2?: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-2?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//position-2?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.Position2, "Go(*fyne.Position)") + return resObj + }, + }, + // refresh causes this object to be redrawn with its configured state. + // + // Args: + // * recv - Go(*canvas.Circle) + "Go(*canvas.Circle)//refresh": { + Doc: "(*canvas.Circle).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//refresh: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize sets a new bottom-right position for the circle object + // If it has a stroke width this will cause it to Refresh. + // + // Args: + // * recv - Go(*canvas.Circle) + // * size - Go(fyne.Size) + "Go(*canvas.Circle)//resize": { + Doc: "(*canvas.Circle).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//resize: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // show will set this circle to be visible + // + // Args: + // * recv - Go(*canvas.Circle) + "Go(*canvas.Circle)//show": { + Doc: "(*canvas.Circle).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//show: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // size returns the current size of bounding box for this circle object + // + // Args: + // * recv - Go(*canvas.Circle) + // Result: + // * Go(fyne.size) + "Go(*canvas.Circle)//size": { + Doc: "(*canvas.Circle).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//size: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * stroke-color - Go(color.Color) + // Result: + // * Go(color.Color) + "Go(*canvas.Circle)//stroke-color!": { + Doc: "Set *canvas.Circle StrokeColor value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//stroke-color!: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//stroke-color!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//stroke-color!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//stroke-color!: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//stroke-color!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.StrokeColor = newVal + return arg0 + }, + }, + // Result: + // * Go(color.Color) + "Go(*canvas.Circle)//stroke-color?": { + Doc: "Get *canvas.Circle StrokeColor value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//stroke-color?: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//stroke-color?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//stroke-color?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.StrokeColor, "Go(color.Color)") + return resObj + }, + }, + // Args: + // * stroke-width - decimal + // Result: + // * decimal + "Go(*canvas.Circle)//stroke-width!": { + Doc: "Set *canvas.Circle StrokeWidth value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//stroke-width!: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//stroke-width!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//stroke-width!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//stroke-width!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.StrokeWidth = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*canvas.Circle)//stroke-width?": { + Doc: "Get *canvas.Circle StrokeWidth value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//stroke-width?: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//stroke-width?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//stroke-width?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.StrokeWidth)) + return resObj + }, + }, + // visible returns true if this circle is visible, false otherwise + // + // Args: + // * recv - Go(*canvas.Circle) + // Result: + // * bool + "Go(*canvas.Circle)//visible": { + Doc: "(*canvas.Circle).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Circle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Circle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//visible: arg 1: " + "expected native of type *canvas.Circle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Circle)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // alpha is a convenience function that returns the alpha value for an image + // based on its Translucency value. The result is 1.0 - Translucency. + // + // Args: + // * recv - Go(*canvas.Image) + // Result: + // * decimal + "Go(*canvas.Image)//alpha": { + Doc: "(*canvas.Image).Alpha", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//alpha: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//alpha: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//alpha: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Alpha() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // aspect will return the original content aspect after it was last refreshed. + // + // Since: 2.4 + // + // Args: + // * recv - Go(*canvas.Image) + // Result: + // * decimal + "Go(*canvas.Image)//aspect": { + Doc: "(*canvas.Image).Aspect", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//aspect: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//aspect: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//aspect: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Aspect() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // Args: + // * file - string + // Result: + // * string + "Go(*canvas.Image)//file!": { + Doc: "Set *canvas.Image File value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//file!: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//file!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//file!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//file!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.File = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*canvas.Image)//file?": { + Doc: "Get *canvas.Image File value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//file?: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//file?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//file?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.File) + return resObj + }, + }, + // Args: + // * fill-mode - integer + // Result: + // * integer + "Go(*canvas.Image)//fill-mode!": { + Doc: "Set *canvas.Image FillMode value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//fill-mode!: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//fill-mode!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//fill-mode!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal canvas.ImageFill + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal canvas.ImageFill + if natOk { + natVal, natValOk = nat.Value.(canvas.ImageFill) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//fill-mode!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = canvas.ImageFill(u) + } + } + self.FillMode = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*canvas.Image)//fill-mode?": { + Doc: "Get *canvas.Image FillMode value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//fill-mode?: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//fill-mode?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//fill-mode?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.FillMode))) + return resObj + }, + }, + // hide will set this image to not be visible + // + // Args: + // * recv - Go(*canvas.Image) + "Go(*canvas.Image)//hide": { + Doc: "(*canvas.Image).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//hide: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * image - Go(image.Image) + // Result: + // * Go(image.Image) + "Go(*canvas.Image)//image!": { + Doc: "Set *canvas.Image Image value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//image!: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//image!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//image!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal image.Image + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(image.Image); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//image!: arg 2: " + "expected native of type image.Image, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//image!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Image = newVal + return arg0 + }, + }, + // Result: + // * Go(image.Image) + "Go(*canvas.Image)//image?": { + Doc: "Get *canvas.Image Image value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//image?: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//image?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//image?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.Image, "Go(image.Image)") + return resObj + }, + }, + // min-size returns the specified minimum size, if set, or {1, 1} otherwise. + // + // Args: + // * recv - Go(*canvas.Image) + // Result: + // * Go(fyne.Size) + "Go(*canvas.Image)//min-size": { + Doc: "(*canvas.Image).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//min-size: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // move the image object to a new position, relative to its parent top, left corner. + // + // Args: + // * recv - Go(*canvas.Image) + // * pos - Go(fyne.Position) + "Go(*canvas.Image)//move": { + Doc: "(*canvas.Image).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//move: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // refresh causes this image to be redrawn with its configured state. + // + // Args: + // * recv - Go(*canvas.Image) + "Go(*canvas.Image)//refresh": { + Doc: "(*canvas.Image).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//refresh: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize on an image will scale the content or reposition it according to FillMode. + // It will normally cause a Refresh to ensure the pixels are recalculated. + // + // Args: + // * recv - Go(*canvas.Image) + // * s - Go(fyne.Size) + "Go(*canvas.Image)//resize": { + Doc: "(*canvas.Image).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//resize: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * resource - Go(fyne.Resource) + // Result: + // * Go(fyne.Resource) + "Go(*canvas.Image)//resource!": { + Doc: "Set *canvas.Image Resource value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//resource!: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//resource!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//resource!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//resource!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//resource!: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//resource!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//resource!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Resource = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Resource) + "Go(*canvas.Image)//resource?": { + Doc: "Get *canvas.Image Resource value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//resource?: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//resource?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//resource?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Resource, "Go(fyne.Resource)") + return resObj + }, + }, + // Args: + // * scale-mode - integer + // Result: + // * integer + "Go(*canvas.Image)//scale-mode!": { + Doc: "Set *canvas.Image ScaleMode value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//scale-mode!: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//scale-mode!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//scale-mode!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal canvas.ImageScale + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal canvas.ImageScale + if natOk { + natVal, natValOk = nat.Value.(canvas.ImageScale) + } + if natValOk { + newVal = natVal + } else { + var u int32 + if vc, ok := arg1.(env.Integer); ok { + u = int32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//scale-mode!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = canvas.ImageScale(u) + } + } + self.ScaleMode = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*canvas.Image)//scale-mode?": { + Doc: "Get *canvas.Image ScaleMode value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//scale-mode?: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//scale-mode?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//scale-mode?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int32(self.ScaleMode))) + return resObj + }, + }, + // Args: + // * translucency - decimal + // Result: + // * decimal + "Go(*canvas.Image)//translucency!": { + Doc: "Set *canvas.Image Translucency value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//translucency!: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//translucency!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//translucency!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float64 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//translucency!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Translucency = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*canvas.Image)//translucency?": { + Doc: "Get *canvas.Image Translucency value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//translucency?: arg 1: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//translucency?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Image)//translucency?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.Translucency)) + return resObj + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*canvas.Line)//hidden!": { + Doc: "Set *canvas.Line Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//hidden!: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*canvas.Line)//hidden?": { + Doc: "Get *canvas.Line Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//hidden?: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // hide will set this line to not be visible + // + // Args: + // * recv - Go(*canvas.Line) + "Go(*canvas.Line)//hide": { + Doc: "(*canvas.Line).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//hide: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size for a Line simply returns Size{1, 1} as there is no + // explicit content + // + // Args: + // * recv - Go(*canvas.Line) + // Result: + // * Go(fyne.Size) + "Go(*canvas.Line)//min-size": { + Doc: "(*canvas.Line).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//min-size: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // move the line object to a new position, relative to its parent / canvas + // + // Args: + // * recv - Go(*canvas.Line) + // * pos - Go(fyne.Position) + "Go(*canvas.Line)//move": { + Doc: "(*canvas.Line).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//move: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // position gets the current top-left position of this line object, relative to its parent / canvas + // + // Args: + // * recv - Go(*canvas.Line) + // Result: + // * Go(fyne.position) + "Go(*canvas.Line)//position": { + Doc: "(*canvas.Line).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * position-1 - Go(fyne.Position) + // Result: + // * Go(fyne.Position) + "Go(*canvas.Line)//position-1!": { + Doc: "Set *canvas.Line Position1 value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-1!: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-1!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-1!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-1!: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-1!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-1!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Position1 = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Position) + "Go(*canvas.Line)//position-1?": { + Doc: "Get *canvas.Line Position1 value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-1?: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-1?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-1?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.Position1, "Go(*fyne.Position)") + return resObj + }, + }, + // Args: + // * position-2 - Go(fyne.Position) + // Result: + // * Go(fyne.Position) + "Go(*canvas.Line)//position-2!": { + Doc: "Set *canvas.Line Position2 value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-2!: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-2!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-2!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-2!: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-2!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-2!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Position2 = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Position) + "Go(*canvas.Line)//position-2?": { + Doc: "Get *canvas.Line Position2 value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-2?: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-2?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//position-2?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.Position2, "Go(*fyne.Position)") + return resObj + }, + }, + // refresh causes this line to be redrawn with its configured state. + // + // Args: + // * recv - Go(*canvas.Line) + "Go(*canvas.Line)//refresh": { + Doc: "(*canvas.Line).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//refresh: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize sets a new bottom-right position for the line object, then it will then be refreshed. + // + // Args: + // * recv - Go(*canvas.Line) + // * size - Go(fyne.Size) + "Go(*canvas.Line)//resize": { + Doc: "(*canvas.Line).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//resize: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // show will set this line to be visible + // + // Args: + // * recv - Go(*canvas.Line) + "Go(*canvas.Line)//show": { + Doc: "(*canvas.Line).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//show: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // size returns the current size of bounding box for this line object + // + // Args: + // * recv - Go(*canvas.Line) + // Result: + // * Go(fyne.size) + "Go(*canvas.Line)//size": { + Doc: "(*canvas.Line).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//size: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * stroke-color - Go(color.Color) + // Result: + // * Go(color.Color) + "Go(*canvas.Line)//stroke-color!": { + Doc: "Set *canvas.Line StrokeColor value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//stroke-color!: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//stroke-color!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//stroke-color!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//stroke-color!: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//stroke-color!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.StrokeColor = newVal + return arg0 + }, + }, + // Result: + // * Go(color.Color) + "Go(*canvas.Line)//stroke-color?": { + Doc: "Get *canvas.Line StrokeColor value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//stroke-color?: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//stroke-color?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//stroke-color?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.StrokeColor, "Go(color.Color)") + return resObj + }, + }, + // Args: + // * stroke-width - decimal + // Result: + // * decimal + "Go(*canvas.Line)//stroke-width!": { + Doc: "Set *canvas.Line StrokeWidth value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//stroke-width!: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//stroke-width!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//stroke-width!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//stroke-width!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.StrokeWidth = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*canvas.Line)//stroke-width?": { + Doc: "Get *canvas.Line StrokeWidth value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//stroke-width?: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//stroke-width?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//stroke-width?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.StrokeWidth)) + return resObj + }, + }, + // visible returns true if this line// Show will set this circle to be visible is visible, false otherwise + // + // Args: + // * recv - Go(*canvas.Line) + // Result: + // * bool + "Go(*canvas.Line)//visible": { + Doc: "(*canvas.Line).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Line + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Line); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//visible: arg 1: " + "expected native of type *canvas.Line, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Line)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * angle - decimal + // Result: + // * decimal + "Go(*canvas.LinearGradient)//angle!": { + Doc: "Set *canvas.LinearGradient Angle value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.LinearGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.LinearGradient); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//angle!: arg 1: " + "expected native of type *canvas.LinearGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//angle!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//angle!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float64 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//angle!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Angle = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*canvas.LinearGradient)//angle?": { + Doc: "Get *canvas.LinearGradient Angle value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.LinearGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.LinearGradient); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//angle?: arg 1: " + "expected native of type *canvas.LinearGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//angle?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//angle?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.Angle)) + return resObj + }, + }, + // Args: + // * end-color - Go(color.Color) + // Result: + // * Go(color.Color) + "Go(*canvas.LinearGradient)//end-color!": { + Doc: "Set *canvas.LinearGradient EndColor value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.LinearGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.LinearGradient); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//end-color!: arg 1: " + "expected native of type *canvas.LinearGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//end-color!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//end-color!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//end-color!: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//end-color!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.EndColor = newVal + return arg0 + }, + }, + // Result: + // * Go(color.Color) + "Go(*canvas.LinearGradient)//end-color?": { + Doc: "Get *canvas.LinearGradient EndColor value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.LinearGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.LinearGradient); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//end-color?: arg 1: " + "expected native of type *canvas.LinearGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//end-color?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//end-color?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.EndColor, "Go(color.Color)") + return resObj + }, + }, + // generate calculates an image of the gradient with the specified width and height. + // + // Args: + // * recv - Go(*canvas.LinearGradient) + // * iw - integer + // * ih - integer + // Result: + // * Go(image.Image) + "Go(*canvas.LinearGradient)//generate": { + Doc: "(*canvas.LinearGradient).Generate", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.LinearGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.LinearGradient); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//generate: arg 1: " + "expected native of type *canvas.LinearGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//generate: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//generate: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//generate: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val int + if vc, ok := arg2.(env.Integer); ok { + arg2Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//generate: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + res0 := arg0Val.Generate(arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(image.Image)") + return res0Obj + }, + }, + // hide will set this gradient to not be visible + // + // Args: + // * recv - Go(*canvas.LinearGradient) + "Go(*canvas.LinearGradient)//hide": { + Doc: "(*canvas.LinearGradient).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.LinearGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.LinearGradient); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//hide: arg 1: " + "expected native of type *canvas.LinearGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // move the gradient to a new position, relative to its parent / canvas + // + // Args: + // * recv - Go(*canvas.LinearGradient) + // * pos - Go(fyne.Position) + "Go(*canvas.LinearGradient)//move": { + Doc: "(*canvas.LinearGradient).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.LinearGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.LinearGradient); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//move: arg 1: " + "expected native of type *canvas.LinearGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // refresh causes this gradient to be redrawn with its configured state. + // + // Args: + // * recv - Go(*canvas.LinearGradient) + "Go(*canvas.LinearGradient)//refresh": { + Doc: "(*canvas.LinearGradient).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.LinearGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.LinearGradient); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//refresh: arg 1: " + "expected native of type *canvas.LinearGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize resizes the gradient to a new size. + // + // Args: + // * recv - Go(*canvas.LinearGradient) + // * size - Go(fyne.Size) + "Go(*canvas.LinearGradient)//resize": { + Doc: "(*canvas.LinearGradient).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.LinearGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.LinearGradient); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//resize: arg 1: " + "expected native of type *canvas.LinearGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * start-color - Go(color.Color) + // Result: + // * Go(color.Color) + "Go(*canvas.LinearGradient)//start-color!": { + Doc: "Set *canvas.LinearGradient StartColor value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.LinearGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.LinearGradient); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//start-color!: arg 1: " + "expected native of type *canvas.LinearGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//start-color!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//start-color!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//start-color!: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//start-color!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.StartColor = newVal + return arg0 + }, + }, + // Result: + // * Go(color.Color) + "Go(*canvas.LinearGradient)//start-color?": { + Doc: "Get *canvas.LinearGradient StartColor value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.LinearGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.LinearGradient); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//start-color?: arg 1: " + "expected native of type *canvas.LinearGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//start-color?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.LinearGradient)//start-color?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.StartColor, "Go(color.Color)") + return resObj + }, + }, + // Args: + // * center-offset-x - decimal + // Result: + // * decimal + "Go(*canvas.RadialGradient)//center-offset-x!": { + Doc: "Set *canvas.RadialGradient CenterOffsetX value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.RadialGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.RadialGradient); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//center-offset-x!: arg 1: " + "expected native of type *canvas.RadialGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//center-offset-x!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//center-offset-x!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float64 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//center-offset-x!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.CenterOffsetX = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*canvas.RadialGradient)//center-offset-x?": { + Doc: "Get *canvas.RadialGradient CenterOffsetX value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.RadialGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.RadialGradient); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//center-offset-x?: arg 1: " + "expected native of type *canvas.RadialGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//center-offset-x?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//center-offset-x?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.CenterOffsetX)) + return resObj + }, + }, + // Args: + // * center-offset-y - decimal + // Result: + // * decimal + "Go(*canvas.RadialGradient)//center-offset-y!": { + Doc: "Set *canvas.RadialGradient CenterOffsetY value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.RadialGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.RadialGradient); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//center-offset-y!: arg 1: " + "expected native of type *canvas.RadialGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//center-offset-y!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//center-offset-y!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float64 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//center-offset-y!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.CenterOffsetY = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*canvas.RadialGradient)//center-offset-y?": { + Doc: "Get *canvas.RadialGradient CenterOffsetY value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.RadialGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.RadialGradient); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//center-offset-y?: arg 1: " + "expected native of type *canvas.RadialGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//center-offset-y?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//center-offset-y?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.CenterOffsetY)) + return resObj + }, + }, + // Args: + // * end-color - Go(color.Color) + // Result: + // * Go(color.Color) + "Go(*canvas.RadialGradient)//end-color!": { + Doc: "Set *canvas.RadialGradient EndColor value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.RadialGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.RadialGradient); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//end-color!: arg 1: " + "expected native of type *canvas.RadialGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//end-color!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//end-color!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//end-color!: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//end-color!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.EndColor = newVal + return arg0 + }, + }, + // Result: + // * Go(color.Color) + "Go(*canvas.RadialGradient)//end-color?": { + Doc: "Get *canvas.RadialGradient EndColor value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.RadialGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.RadialGradient); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//end-color?: arg 1: " + "expected native of type *canvas.RadialGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//end-color?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//end-color?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.EndColor, "Go(color.Color)") + return resObj + }, + }, + // generate calculates an image of the gradient with the specified width and height. + // + // Args: + // * recv - Go(*canvas.RadialGradient) + // * iw - integer + // * ih - integer + // Result: + // * Go(image.Image) + "Go(*canvas.RadialGradient)//generate": { + Doc: "(*canvas.RadialGradient).Generate", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.RadialGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.RadialGradient); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//generate: arg 1: " + "expected native of type *canvas.RadialGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//generate: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//generate: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//generate: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val int + if vc, ok := arg2.(env.Integer); ok { + arg2Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//generate: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + res0 := arg0Val.Generate(arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(image.Image)") + return res0Obj + }, + }, + // hide will set this gradient to not be visible + // + // Args: + // * recv - Go(*canvas.RadialGradient) + "Go(*canvas.RadialGradient)//hide": { + Doc: "(*canvas.RadialGradient).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.RadialGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.RadialGradient); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//hide: arg 1: " + "expected native of type *canvas.RadialGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // move the gradient to a new position, relative to its parent / canvas + // + // Args: + // * recv - Go(*canvas.RadialGradient) + // * pos - Go(fyne.Position) + "Go(*canvas.RadialGradient)//move": { + Doc: "(*canvas.RadialGradient).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.RadialGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.RadialGradient); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//move: arg 1: " + "expected native of type *canvas.RadialGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // refresh causes this gradient to be redrawn with its configured state. + // + // Args: + // * recv - Go(*canvas.RadialGradient) + "Go(*canvas.RadialGradient)//refresh": { + Doc: "(*canvas.RadialGradient).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.RadialGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.RadialGradient); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//refresh: arg 1: " + "expected native of type *canvas.RadialGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize resizes the gradient to a new size. + // + // Args: + // * recv - Go(*canvas.RadialGradient) + // * size - Go(fyne.Size) + "Go(*canvas.RadialGradient)//resize": { + Doc: "(*canvas.RadialGradient).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.RadialGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.RadialGradient); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//resize: arg 1: " + "expected native of type *canvas.RadialGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * start-color - Go(color.Color) + // Result: + // * Go(color.Color) + "Go(*canvas.RadialGradient)//start-color!": { + Doc: "Set *canvas.RadialGradient StartColor value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.RadialGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.RadialGradient); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//start-color!: arg 1: " + "expected native of type *canvas.RadialGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//start-color!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//start-color!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//start-color!: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//start-color!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.StartColor = newVal + return arg0 + }, + }, + // Result: + // * Go(color.Color) + "Go(*canvas.RadialGradient)//start-color?": { + Doc: "Get *canvas.RadialGradient StartColor value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.RadialGradient + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.RadialGradient); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//start-color?: arg 1: " + "expected native of type *canvas.RadialGradient, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//start-color?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.RadialGradient)//start-color?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.StartColor, "Go(color.Color)") + return resObj + }, + }, + // alpha is a convenience function that returns the alpha value for a raster + // based on its Translucency value. The result is 1.0 - Translucency. + // + // Args: + // * recv - Go(*canvas.Raster) + // Result: + // * decimal + "Go(*canvas.Raster)//alpha": { + Doc: "(*canvas.Raster).Alpha", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Raster + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Raster); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//alpha: arg 1: " + "expected native of type *canvas.Raster, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//alpha: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//alpha: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Alpha() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // Args: + // * generator - fn { integer integer } -> Go(image.Image) + // Result: + // * fn { integer integer } -> Go(image.Image) + "Go(*canvas.Raster)//generator!": { + Doc: "Set *canvas.Raster Generator value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Raster + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Raster); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//generator!: arg 1: " + "expected native of type *canvas.Raster, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//generator!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//generator!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(int, int) image.Image + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//generator!: arg 2: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 int, farg1 int) image.Image { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = *env.NewInteger(int64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res image.Image + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(image.Image); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*canvas.Raster)//generator!: arg 2: callback result: "+"expected native of type image.Image, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*canvas.Raster)//generator!: arg 2: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//generator!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//generator!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.Generator = newVal + return arg0 + }, + }, + // Result: + // * fn { integer integer } -> Go(image.Image) + "Go(*canvas.Raster)//generator?": { + Doc: "Get *canvas.Raster Generator value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Raster + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Raster); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//generator?: arg 1: " + "expected native of type *canvas.Raster, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//generator?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//generator?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val int + if vc, ok := arg0.(env.Integer); ok { + arg0Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//generator?: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//generator?: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := self.Generator(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(image.Image)") + return res0Obj + }, 2, false, false, "Returned func") + return resObj + }, + }, + // hide will set this raster to not be visible + // + // Args: + // * recv - Go(*canvas.Raster) + "Go(*canvas.Raster)//hide": { + Doc: "(*canvas.Raster).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Raster + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Raster); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//hide: arg 1: " + "expected native of type *canvas.Raster, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // move the raster to a new position, relative to its parent / canvas + // + // Args: + // * recv - Go(*canvas.Raster) + // * pos - Go(fyne.Position) + "Go(*canvas.Raster)//move": { + Doc: "(*canvas.Raster).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Raster + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Raster); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//move: arg 1: " + "expected native of type *canvas.Raster, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // refresh causes this raster to be redrawn with its configured state. + // + // Args: + // * recv - Go(*canvas.Raster) + "Go(*canvas.Raster)//refresh": { + Doc: "(*canvas.Raster).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Raster + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Raster); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//refresh: arg 1: " + "expected native of type *canvas.Raster, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize on a raster image causes the new size to be set and then calls Refresh. + // This causes the underlying data to be recalculated and a new output to be drawn. + // + // Args: + // * recv - Go(*canvas.Raster) + // * s - Go(fyne.Size) + "Go(*canvas.Raster)//resize": { + Doc: "(*canvas.Raster).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Raster + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Raster); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//resize: arg 1: " + "expected native of type *canvas.Raster, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * scale-mode - integer + // Result: + // * integer + "Go(*canvas.Raster)//scale-mode!": { + Doc: "Set *canvas.Raster ScaleMode value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Raster + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Raster); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//scale-mode!: arg 1: " + "expected native of type *canvas.Raster, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//scale-mode!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//scale-mode!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal canvas.ImageScale + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal canvas.ImageScale + if natOk { + natVal, natValOk = nat.Value.(canvas.ImageScale) + } + if natValOk { + newVal = natVal + } else { + var u int32 + if vc, ok := arg1.(env.Integer); ok { + u = int32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//scale-mode!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = canvas.ImageScale(u) + } + } + self.ScaleMode = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*canvas.Raster)//scale-mode?": { + Doc: "Get *canvas.Raster ScaleMode value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Raster + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Raster); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//scale-mode?: arg 1: " + "expected native of type *canvas.Raster, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//scale-mode?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//scale-mode?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int32(self.ScaleMode))) + return resObj + }, + }, + // Args: + // * translucency - decimal + // Result: + // * decimal + "Go(*canvas.Raster)//translucency!": { + Doc: "Set *canvas.Raster Translucency value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Raster + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Raster); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//translucency!: arg 1: " + "expected native of type *canvas.Raster, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//translucency!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//translucency!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float64 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//translucency!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Translucency = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*canvas.Raster)//translucency?": { + Doc: "Get *canvas.Raster Translucency value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Raster + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Raster); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//translucency?: arg 1: " + "expected native of type *canvas.Raster, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//translucency?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Raster)//translucency?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.Translucency)) + return resObj + }, + }, + // Args: + // * corner-radius - decimal + // Result: + // * decimal + "Go(*canvas.Rectangle)//corner-radius!": { + Doc: "Set *canvas.Rectangle CornerRadius value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Rectangle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Rectangle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//corner-radius!: arg 1: " + "expected native of type *canvas.Rectangle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//corner-radius!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//corner-radius!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//corner-radius!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.CornerRadius = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*canvas.Rectangle)//corner-radius?": { + Doc: "Get *canvas.Rectangle CornerRadius value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Rectangle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Rectangle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//corner-radius?: arg 1: " + "expected native of type *canvas.Rectangle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//corner-radius?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//corner-radius?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.CornerRadius)) + return resObj + }, + }, + // Args: + // * fill-color - Go(color.Color) + // Result: + // * Go(color.Color) + "Go(*canvas.Rectangle)//fill-color!": { + Doc: "Set *canvas.Rectangle FillColor value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Rectangle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Rectangle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//fill-color!: arg 1: " + "expected native of type *canvas.Rectangle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//fill-color!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//fill-color!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//fill-color!: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//fill-color!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.FillColor = newVal + return arg0 + }, + }, + // Result: + // * Go(color.Color) + "Go(*canvas.Rectangle)//fill-color?": { + Doc: "Get *canvas.Rectangle FillColor value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Rectangle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Rectangle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//fill-color?: arg 1: " + "expected native of type *canvas.Rectangle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//fill-color?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//fill-color?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.FillColor, "Go(color.Color)") + return resObj + }, + }, + // hide will set this rectangle to not be visible + // + // Args: + // * recv - Go(*canvas.Rectangle) + "Go(*canvas.Rectangle)//hide": { + Doc: "(*canvas.Rectangle).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Rectangle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Rectangle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//hide: arg 1: " + "expected native of type *canvas.Rectangle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // move the rectangle to a new position, relative to its parent / canvas + // + // Args: + // * recv - Go(*canvas.Rectangle) + // * pos - Go(fyne.Position) + "Go(*canvas.Rectangle)//move": { + Doc: "(*canvas.Rectangle).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Rectangle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Rectangle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//move: arg 1: " + "expected native of type *canvas.Rectangle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // refresh causes this rectangle to be redrawn with its configured state. + // + // Args: + // * recv - Go(*canvas.Rectangle) + "Go(*canvas.Rectangle)//refresh": { + Doc: "(*canvas.Rectangle).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Rectangle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Rectangle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//refresh: arg 1: " + "expected native of type *canvas.Rectangle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize on a rectangle updates the new size of this object. + // If it has a stroke width this will cause it to Refresh. + // + // Args: + // * recv - Go(*canvas.Rectangle) + // * s - Go(fyne.Size) + "Go(*canvas.Rectangle)//resize": { + Doc: "(*canvas.Rectangle).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Rectangle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Rectangle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//resize: arg 1: " + "expected native of type *canvas.Rectangle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * stroke-color - Go(color.Color) + // Result: + // * Go(color.Color) + "Go(*canvas.Rectangle)//stroke-color!": { + Doc: "Set *canvas.Rectangle StrokeColor value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Rectangle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Rectangle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//stroke-color!: arg 1: " + "expected native of type *canvas.Rectangle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//stroke-color!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//stroke-color!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//stroke-color!: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//stroke-color!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.StrokeColor = newVal + return arg0 + }, + }, + // Result: + // * Go(color.Color) + "Go(*canvas.Rectangle)//stroke-color?": { + Doc: "Get *canvas.Rectangle StrokeColor value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Rectangle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Rectangle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//stroke-color?: arg 1: " + "expected native of type *canvas.Rectangle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//stroke-color?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//stroke-color?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.StrokeColor, "Go(color.Color)") + return resObj + }, + }, + // Args: + // * stroke-width - decimal + // Result: + // * decimal + "Go(*canvas.Rectangle)//stroke-width!": { + Doc: "Set *canvas.Rectangle StrokeWidth value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Rectangle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Rectangle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//stroke-width!: arg 1: " + "expected native of type *canvas.Rectangle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//stroke-width!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//stroke-width!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//stroke-width!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.StrokeWidth = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*canvas.Rectangle)//stroke-width?": { + Doc: "Get *canvas.Rectangle StrokeWidth value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Rectangle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Rectangle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//stroke-width?: arg 1: " + "expected native of type *canvas.Rectangle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//stroke-width?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Rectangle)//stroke-width?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.StrokeWidth)) + return resObj + }, + }, + // Args: + // * alignment - integer + // Result: + // * integer + "Go(*canvas.Text)//alignment!": { + Doc: "Set *canvas.Text Alignment value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//alignment!: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//alignment!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//alignment!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.TextAlign + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextAlign + if natOk { + natVal, natValOk = nat.Value.(fyne.TextAlign) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//alignment!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.TextAlign(u) + } + } + self.Alignment = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*canvas.Text)//alignment?": { + Doc: "Get *canvas.Text Alignment value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//alignment?: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//alignment?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//alignment?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Alignment))) + return resObj + }, + }, + // Args: + // * color - Go(color.Color) + // Result: + // * Go(color.Color) + "Go(*canvas.Text)//color!": { + Doc: "Set *canvas.Text Color value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//color!: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//color!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//color!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//color!: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//color!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Color = newVal + return arg0 + }, + }, + // Result: + // * Go(color.Color) + "Go(*canvas.Text)//color?": { + Doc: "Get *canvas.Text Color value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//color?: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//color?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//color?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.Color, "Go(color.Color)") + return resObj + }, + }, + // Args: + // * font-source - Go(fyne.Resource) + // Result: + // * Go(fyne.Resource) + "Go(*canvas.Text)//font-source!": { + Doc: "Set *canvas.Text FontSource value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//font-source!: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//font-source!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//font-source!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//font-source!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//font-source!: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//font-source!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//font-source!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.FontSource = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Resource) + "Go(*canvas.Text)//font-source?": { + Doc: "Get *canvas.Text FontSource value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//font-source?: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//font-source?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//font-source?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.FontSource, "Go(fyne.Resource)") + return resObj + }, + }, + // hide will set this text to not be visible + // + // Args: + // * recv - Go(*canvas.Text) + "Go(*canvas.Text)//hide": { + Doc: "(*canvas.Text).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//hide: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size returns the minimum size of this text object based on its font size and content. + // This is normally determined by the render implementation. + // + // Args: + // * recv - Go(*canvas.Text) + // Result: + // * Go(fyne.Size) + "Go(*canvas.Text)//min-size": { + Doc: "(*canvas.Text).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//min-size: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // move the text to a new position, relative to its parent / canvas + // + // Args: + // * recv - Go(*canvas.Text) + // * pos - Go(fyne.Position) + "Go(*canvas.Text)//move": { + Doc: "(*canvas.Text).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//move: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // refresh causes this text to be redrawn with its configured state. + // + // Args: + // * recv - Go(*canvas.Text) + "Go(*canvas.Text)//refresh": { + Doc: "(*canvas.Text).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//refresh: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize on a text updates the new size of this object, which may not result in a visual change, depending on alignment. + // + // Args: + // * recv - Go(*canvas.Text) + // * s - Go(fyne.Size) + "Go(*canvas.Text)//resize": { + Doc: "(*canvas.Text).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//resize: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // set-min-size has no effect as the smallest size this canvas object can be is based on its font size and content. + // + // Args: + // * recv - Go(*canvas.Text) + // * 1 - Go(fyne.Size) + "Go(*canvas.Text)//set-min-size": { + Doc: "(*canvas.Text).SetMinSize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//set-min-size: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//set-min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//set-min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//set-min-size: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//set-min-size: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetMinSize(arg1Val) + return arg0 + }, + }, + // Args: + // * text - string + // Result: + // * string + "Go(*canvas.Text)//text!": { + Doc: "Set *canvas.Text Text value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text!: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Text = newVal + return arg0 + }, + }, + // Args: + // * text-size - decimal + // Result: + // * decimal + "Go(*canvas.Text)//text-size!": { + Doc: "Set *canvas.Text TextSize value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-size!: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-size!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-size!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-size!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.TextSize = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*canvas.Text)//text-size?": { + Doc: "Get *canvas.Text TextSize value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-size?: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-size?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-size?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.TextSize)) + return resObj + }, + }, + // Args: + // * text-style - Go(fyne.TextStyle) + // Result: + // * Go(fyne.TextStyle) + "Go(*canvas.Text)//text-style!": { + Doc: "Set *canvas.Text TextStyle value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-style!: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-style!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-style!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.TextStyle + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-style!: arg 2: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-style!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-style!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.TextStyle = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.TextStyle) + "Go(*canvas.Text)//text-style?": { + Doc: "Get *canvas.Text TextStyle value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-style?: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-style?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text-style?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.TextStyle, "Go(*fyne.TextStyle)") + return resObj + }, + }, + // Result: + // * string + "Go(*canvas.Text)//text?": { + Doc: "Get *canvas.Text Text value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *canvas.Text + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Text); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text?: arg 1: " + "expected native of type *canvas.Text, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*canvas.Text)//text?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Text) + return resObj + }, + }, + // append adds a new TabItem to the end of the tab bar. + // + // Args: + // * recv - Go(*container.AppTabs) + // * item - Go(*container.TabItem) + "Go(*container.AppTabs)//append": { + Doc: "(*container.AppTabs).Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//append: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *container.TabItem + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//append: arg 2: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//append: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//append: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Append(arg1Val) + return arg0 + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*container.AppTabs)//base-widget!": { + Doc: "Set *container.AppTabs BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//base-widget!: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*container.AppTabs)//base-widget?": { + Doc: "Get *container.AppTabs BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//base-widget?: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*container.AppTabs) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*container.AppTabs)//create-renderer": { + Doc: "(*container.AppTabs).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//create-renderer: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // current-tab returns the currently selected TabItem. + // + // Deprecated: Use `AppTabs.Selected() *TabItem` instead. + // + // Args: + // * recv - Go(*container.AppTabs) + // Result: + // * Go(*container.TabItem) + "Go(*container.AppTabs)//current-tab": { + Doc: "(*container.AppTabs).CurrentTab", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//current-tab: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//current-tab: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//current-tab: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CurrentTab() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.TabItem)") + return res0Obj + }, + }, + // current-tab-index returns the index of the currently selected TabItem. + // + // Deprecated: Use `AppTabs.SelectedIndex() int` instead. + // + // Args: + // * recv - Go(*container.AppTabs) + // Result: + // * integer + "Go(*container.AppTabs)//current-tab-index": { + Doc: "(*container.AppTabs).CurrentTabIndex", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//current-tab-index: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//current-tab-index: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//current-tab-index: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CurrentTabIndex() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // disable-index disables the TabItem at the specified index. + // + // Since: 2.3 + // + // Args: + // * recv - Go(*container.AppTabs) + // * i - integer + "Go(*container.AppTabs)//disable-index": { + Doc: "(*container.AppTabs).DisableIndex", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//disable-index: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//disable-index: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//disable-index: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//disable-index: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.DisableIndex(arg1Val) + return arg0 + }, + }, + // disable-item disables the specified TabItem. + // + // Since: 2.3 + // + // Args: + // * recv - Go(*container.AppTabs) + // * item - Go(*container.TabItem) + "Go(*container.AppTabs)//disable-item": { + Doc: "(*container.AppTabs).DisableItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//disable-item: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//disable-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//disable-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *container.TabItem + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//disable-item: arg 2: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//disable-item: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//disable-item: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.DisableItem(arg1Val) + return arg0 + }, + }, + // enable-index enables the TabItem at the specified index. + // + // Since: 2.3 + // + // Args: + // * recv - Go(*container.AppTabs) + // * i - integer + "Go(*container.AppTabs)//enable-index": { + Doc: "(*container.AppTabs).EnableIndex", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//enable-index: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//enable-index: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//enable-index: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//enable-index: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.EnableIndex(arg1Val) + return arg0 + }, + }, + // enable-item enables the specified TabItem. + // + // Since: 2.3 + // + // Args: + // * recv - Go(*container.AppTabs) + // * item - Go(*container.TabItem) + "Go(*container.AppTabs)//enable-item": { + Doc: "(*container.AppTabs).EnableItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//enable-item: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//enable-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//enable-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *container.TabItem + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//enable-item: arg 2: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//enable-item: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//enable-item: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.EnableItem(arg1Val) + return arg0 + }, + }, + // extend-base-widget is used by an extending widget to make use of BaseWidget functionality. + // + // Deprecated: Support for extending containers is being removed + // + // Args: + // * recv - Go(*container.AppTabs) + // * wid - Go(fyne.Widget) + "Go(*container.AppTabs)//extend-base-widget": { + Doc: "(*container.AppTabs).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//extend-base-widget: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*container.AppTabs)//hidden!": { + Doc: "Set *container.AppTabs Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//hidden!: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*container.AppTabs)//hidden?": { + Doc: "Get *container.AppTabs Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//hidden?: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // hide hides the widget. + // + // Implements: fyne.CanvasObject + // + // Args: + // * recv - Go(*container.AppTabs) + "Go(*container.AppTabs)//hide": { + Doc: "(*container.AppTabs).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//hide: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * items - block[Go(*container.TabItem)] + // Result: + // * block[Go(*container.TabItem)] + "Go(*container.AppTabs)//items!": { + Doc: "Set *container.AppTabs Items value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//items!: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//items!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//items!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []*container.TabItem + switch v := arg1.(type) { + case env.Block: + newVal = make([]*container.TabItem, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//items!: arg 2: " + "block item: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//items!: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//items!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//items!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//items!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Items = newVal + return arg0 + }, + }, + // Result: + // * block[Go(*container.TabItem)] + "Go(*container.AppTabs)//items?": { + Doc: "Get *container.AppTabs Items value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//items?: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//items?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//items?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Items)) + for i, it := range self.Items { + items[i] = *env.NewNative(ps.Idx, it, "Go(*container.TabItem)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Implements: fyne.CanvasObject + // + // Args: + // * recv - Go(*container.AppTabs) + // Result: + // * Go(fyne.Size) + "Go(*container.AppTabs)//min-size": { + Doc: "(*container.AppTabs).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//min-size: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.AppTabs) + // * pos - Go(fyne.Position) + "Go(*container.AppTabs)//move": { + Doc: "(*container.AppTabs).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//move: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-changed - fn { Go(*container.TabItem) } + // Result: + // * fn { Go(*container.TabItem) } + "Go(*container.AppTabs)//on-changed!": { + Doc: "Set *container.AppTabs OnChanged value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-changed!: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-changed!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-changed!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(*container.TabItem) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-changed!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 *container.TabItem) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*container.TabItem)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-changed!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-changed!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnChanged = newVal + return arg0 + }, + }, + // Result: + // * fn { Go(*container.TabItem) } + "Go(*container.AppTabs)//on-changed?": { + Doc: "Get *container.AppTabs OnChanged value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-changed?: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-changed?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-changed?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.TabItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-changed?: arg 1: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-changed?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-changed?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.OnChanged(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-selected - fn { Go(*container.TabItem) } + // Result: + // * fn { Go(*container.TabItem) } + "Go(*container.AppTabs)//on-selected!": { + Doc: "Set *container.AppTabs OnSelected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-selected!: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-selected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-selected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(*container.TabItem) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-selected!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 *container.TabItem) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*container.TabItem)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-selected!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-selected!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnSelected = newVal + return arg0 + }, + }, + // Result: + // * fn { Go(*container.TabItem) } + "Go(*container.AppTabs)//on-selected?": { + Doc: "Get *container.AppTabs OnSelected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-selected?: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-selected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-selected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.TabItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-selected?: arg 1: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-selected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-selected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.OnSelected(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-unselected - fn { Go(*container.TabItem) } + // Result: + // * fn { Go(*container.TabItem) } + "Go(*container.AppTabs)//on-unselected!": { + Doc: "Set *container.AppTabs OnUnselected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-unselected!: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-unselected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-unselected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(*container.TabItem) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-unselected!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 *container.TabItem) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*container.TabItem)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-unselected!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-unselected!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnUnselected = newVal + return arg0 + }, + }, + // Result: + // * fn { Go(*container.TabItem) } + "Go(*container.AppTabs)//on-unselected?": { + Doc: "Get *container.AppTabs OnUnselected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-unselected?: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-unselected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-unselected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.TabItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-unselected?: arg 1: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-unselected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//on-unselected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.OnUnselected(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*container.AppTabs) + // Result: + // * Go(fyne.position) + "Go(*container.AppTabs)//position": { + Doc: "(*container.AppTabs).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//position: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.AppTabs) + "Go(*container.AppTabs)//refresh": { + Doc: "(*container.AppTabs).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//refresh: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // remove tab by value. + // + // Args: + // * recv - Go(*container.AppTabs) + // * item - Go(*container.TabItem) + "Go(*container.AppTabs)//remove": { + Doc: "(*container.AppTabs).Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//remove: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *container.TabItem + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//remove: arg 2: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//remove: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//remove: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Remove(arg1Val) + return arg0 + }, + }, + // remove-index removes tab by index. + // + // Args: + // * recv - Go(*container.AppTabs) + // * index - integer + "Go(*container.AppTabs)//remove-index": { + Doc: "(*container.AppTabs).RemoveIndex", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//remove-index: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//remove-index: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//remove-index: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//remove-index: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.RemoveIndex(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*container.AppTabs) + // * size - Go(fyne.Size) + "Go(*container.AppTabs)//resize": { + Doc: "(*container.AppTabs).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//resize: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // select sets the specified TabItem to be selected and its content visible. + // + // Args: + // * recv - Go(*container.AppTabs) + // * item - Go(*container.TabItem) + "Go(*container.AppTabs)//select": { + Doc: "(*container.AppTabs).Select", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *container.TabItem + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select: arg 2: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Select(arg1Val) + return arg0 + }, + }, + // select-index sets the TabItem at the specific index to be selected and its content visible. + // + // Args: + // * recv - Go(*container.AppTabs) + // * index - integer + "Go(*container.AppTabs)//select-index": { + Doc: "(*container.AppTabs).SelectIndex", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select-index: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select-index: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select-index: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select-index: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SelectIndex(arg1Val) + return arg0 + }, + }, + // select-tab sets the specified TabItem to be selected and its content visible. + // + // Deprecated: Use `AppTabs.Select(*TabItem)` instead. + // + // Args: + // * recv - Go(*container.AppTabs) + // * item - Go(*container.TabItem) + "Go(*container.AppTabs)//select-tab": { + Doc: "(*container.AppTabs).SelectTab", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select-tab: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select-tab: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select-tab: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *container.TabItem + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select-tab: arg 2: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select-tab: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select-tab: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SelectTab(arg1Val) + return arg0 + }, + }, + // select-tab-index sets the TabItem at the specific index to be selected and its content visible. + // + // Deprecated: Use `AppTabs.SelectIndex(int)` instead. + // + // Args: + // * recv - Go(*container.AppTabs) + // * index - integer + "Go(*container.AppTabs)//select-tab-index": { + Doc: "(*container.AppTabs).SelectTabIndex", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select-tab-index: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select-tab-index: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select-tab-index: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//select-tab-index: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SelectTabIndex(arg1Val) + return arg0 + }, + }, + // selected returns the currently selected TabItem. + // + // Args: + // * recv - Go(*container.AppTabs) + // Result: + // * Go(*container.TabItem) + "Go(*container.AppTabs)//selected": { + Doc: "(*container.AppTabs).Selected", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//selected: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//selected: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//selected: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Selected() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.TabItem)") + return res0Obj + }, + }, + // selected-index returns the index of the currently selected TabItem. + // + // Args: + // * recv - Go(*container.AppTabs) + // Result: + // * integer + "Go(*container.AppTabs)//selected-index": { + Doc: "(*container.AppTabs).SelectedIndex", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//selected-index: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//selected-index: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//selected-index: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.SelectedIndex() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // set-items sets the containers items and refreshes. + // + // Args: + // * recv - Go(*container.AppTabs) + // * items - block[Go(*container.TabItem)] + "Go(*container.AppTabs)//set-items": { + Doc: "(*container.AppTabs).SetItems", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//set-items: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//set-items: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//set-items: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []*container.TabItem + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]*container.TabItem, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//set-items: arg 2: " + "block item: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//set-items: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//set-items: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//set-items: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//set-items: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetItems(arg1Val) + return arg0 + }, + }, + // set-tab-location sets the location of the tab bar + // + // Args: + // * recv - Go(*container.AppTabs) + // * l - integer + "Go(*container.AppTabs)//set-tab-location": { + Doc: "(*container.AppTabs).SetTabLocation", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//set-tab-location: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//set-tab-location: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//set-tab-location: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val container.TabLocation + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal container.TabLocation + if natOk { + natVal, natValOk = nat.Value.(container.TabLocation) + } + if natValOk { + arg1Val = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//set-tab-location: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = container.TabLocation(u) + } + } + arg0Val.SetTabLocation(arg1Val) + return arg0 + }, + }, + // show this widget, if it was previously hidden + // + // Implements: fyne.CanvasObject + // + // Args: + // * recv - Go(*container.AppTabs) + "Go(*container.AppTabs)//show": { + Doc: "(*container.AppTabs).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//show: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*container.AppTabs) + // Result: + // * Go(fyne.size) + "Go(*container.AppTabs)//size": { + Doc: "(*container.AppTabs).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//size: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.AppTabs) + // Result: + // * Go(fyne.theme) + "Go(*container.AppTabs)//theme": { + Doc: "(*container.AppTabs).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//theme: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.AppTabs) + // Result: + // * bool + "Go(*container.AppTabs)//visible": { + Doc: "(*container.AppTabs).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.AppTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.AppTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//visible: arg 1: " + "expected native of type *container.AppTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.AppTabs)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // append adds a new TabItem to the end of the tab bar. + // + // Args: + // * recv - Go(*container.DocTabs) + // * item - Go(*container.TabItem) + "Go(*container.DocTabs)//append": { + Doc: "(*container.DocTabs).Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//append: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *container.TabItem + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//append: arg 2: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//append: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//append: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Append(arg1Val) + return arg0 + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*container.DocTabs)//base-widget!": { + Doc: "Set *container.DocTabs BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//base-widget!: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*container.DocTabs)//base-widget?": { + Doc: "Get *container.DocTabs BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//base-widget?: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // Args: + // * close-intercept - fn { Go(*container.TabItem) } + // Result: + // * fn { Go(*container.TabItem) } + "Go(*container.DocTabs)//close-intercept!": { + Doc: "Set *container.DocTabs CloseIntercept value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//close-intercept!: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//close-intercept!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//close-intercept!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(*container.TabItem) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//close-intercept!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 *container.TabItem) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*container.TabItem)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//close-intercept!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//close-intercept!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.CloseIntercept = newVal + return arg0 + }, + }, + // Result: + // * fn { Go(*container.TabItem) } + "Go(*container.DocTabs)//close-intercept?": { + Doc: "Get *container.DocTabs CloseIntercept value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//close-intercept?: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//close-intercept?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//close-intercept?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.TabItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//close-intercept?: arg 1: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//close-intercept?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//close-intercept?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.CloseIntercept(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*container.DocTabs) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*container.DocTabs)//create-renderer": { + Doc: "(*container.DocTabs).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//create-renderer: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * create-tab - fn { } -> Go(*container.TabItem) + // Result: + // * fn { } -> Go(*container.TabItem) + "Go(*container.DocTabs)//create-tab!": { + Doc: "Set *container.DocTabs CreateTab value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//create-tab!: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//create-tab!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//create-tab!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() *container.TabItem + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//create-tab!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() *container.TabItem { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res *container.TabItem + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*container.DocTabs)//create-tab!: arg 2: callback result: "+"expected native of type *container.TabItem, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*container.DocTabs)//create-tab!: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*container.DocTabs)//create-tab!: arg 2: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//create-tab!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//create-tab!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.CreateTab = newVal + return arg0 + }, + }, + // Result: + // * fn { } -> Go(*container.TabItem) + "Go(*container.DocTabs)//create-tab?": { + Doc: "Get *container.DocTabs CreateTab value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//create-tab?: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//create-tab?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//create-tab?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := self.CreateTab() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.TabItem)") + return res0Obj + }, 0, false, false, "Returned func") + return resObj + }, + }, + // disable-index disables the TabItem at the specified index. + // + // Since: 2.3 + // + // Args: + // * recv - Go(*container.DocTabs) + // * i - integer + "Go(*container.DocTabs)//disable-index": { + Doc: "(*container.DocTabs).DisableIndex", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//disable-index: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//disable-index: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//disable-index: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//disable-index: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.DisableIndex(arg1Val) + return arg0 + }, + }, + // disable-item disables the specified TabItem. + // + // Since: 2.3 + // + // Args: + // * recv - Go(*container.DocTabs) + // * item - Go(*container.TabItem) + "Go(*container.DocTabs)//disable-item": { + Doc: "(*container.DocTabs).DisableItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//disable-item: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//disable-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//disable-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *container.TabItem + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//disable-item: arg 2: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//disable-item: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//disable-item: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.DisableItem(arg1Val) + return arg0 + }, + }, + // enable-index enables the TabItem at the specified index. + // + // Since: 2.3 + // + // Args: + // * recv - Go(*container.DocTabs) + // * i - integer + "Go(*container.DocTabs)//enable-index": { + Doc: "(*container.DocTabs).EnableIndex", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//enable-index: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//enable-index: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//enable-index: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//enable-index: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.EnableIndex(arg1Val) + return arg0 + }, + }, + // enable-item enables the specified TabItem. + // + // Since: 2.3 + // + // Args: + // * recv - Go(*container.DocTabs) + // * item - Go(*container.TabItem) + "Go(*container.DocTabs)//enable-item": { + Doc: "(*container.DocTabs).EnableItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//enable-item: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//enable-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//enable-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *container.TabItem + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//enable-item: arg 2: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//enable-item: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//enable-item: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.EnableItem(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*container.DocTabs) + // * wid - Go(fyne.Widget) + "Go(*container.DocTabs)//extend-base-widget": { + Doc: "(*container.DocTabs).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//extend-base-widget: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*container.DocTabs)//hidden!": { + Doc: "Set *container.DocTabs Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//hidden!: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*container.DocTabs)//hidden?": { + Doc: "Get *container.DocTabs Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//hidden?: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // hide hides the widget. + // + // Implements: fyne.CanvasObject + // + // Args: + // * recv - Go(*container.DocTabs) + "Go(*container.DocTabs)//hide": { + Doc: "(*container.DocTabs).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//hide: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * items - block[Go(*container.TabItem)] + // Result: + // * block[Go(*container.TabItem)] + "Go(*container.DocTabs)//items!": { + Doc: "Set *container.DocTabs Items value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//items!: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//items!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//items!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []*container.TabItem + switch v := arg1.(type) { + case env.Block: + newVal = make([]*container.TabItem, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//items!: arg 2: " + "block item: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//items!: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//items!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//items!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//items!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Items = newVal + return arg0 + }, + }, + // Result: + // * block[Go(*container.TabItem)] + "Go(*container.DocTabs)//items?": { + Doc: "Get *container.DocTabs Items value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//items?: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//items?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//items?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Items)) + for i, it := range self.Items { + items[i] = *env.NewNative(ps.Idx, it, "Go(*container.TabItem)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Implements: fyne.CanvasObject + // + // Args: + // * recv - Go(*container.DocTabs) + // Result: + // * Go(fyne.Size) + "Go(*container.DocTabs)//min-size": { + Doc: "(*container.DocTabs).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//min-size: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.DocTabs) + // * pos - Go(fyne.Position) + "Go(*container.DocTabs)//move": { + Doc: "(*container.DocTabs).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//move: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-closed - fn { Go(*container.TabItem) } + // Result: + // * fn { Go(*container.TabItem) } + "Go(*container.DocTabs)//on-closed!": { + Doc: "Set *container.DocTabs OnClosed value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-closed!: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-closed!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-closed!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(*container.TabItem) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-closed!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 *container.TabItem) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*container.TabItem)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-closed!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-closed!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnClosed = newVal + return arg0 + }, + }, + // Result: + // * fn { Go(*container.TabItem) } + "Go(*container.DocTabs)//on-closed?": { + Doc: "Get *container.DocTabs OnClosed value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-closed?: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-closed?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-closed?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.TabItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-closed?: arg 1: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-closed?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-closed?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.OnClosed(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-selected - fn { Go(*container.TabItem) } + // Result: + // * fn { Go(*container.TabItem) } + "Go(*container.DocTabs)//on-selected!": { + Doc: "Set *container.DocTabs OnSelected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-selected!: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-selected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-selected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(*container.TabItem) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-selected!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 *container.TabItem) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*container.TabItem)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-selected!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-selected!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnSelected = newVal + return arg0 + }, + }, + // Result: + // * fn { Go(*container.TabItem) } + "Go(*container.DocTabs)//on-selected?": { + Doc: "Get *container.DocTabs OnSelected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-selected?: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-selected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-selected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.TabItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-selected?: arg 1: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-selected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-selected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.OnSelected(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-unselected - fn { Go(*container.TabItem) } + // Result: + // * fn { Go(*container.TabItem) } + "Go(*container.DocTabs)//on-unselected!": { + Doc: "Set *container.DocTabs OnUnselected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-unselected!: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-unselected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-unselected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(*container.TabItem) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-unselected!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 *container.TabItem) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*container.TabItem)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-unselected!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-unselected!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnUnselected = newVal + return arg0 + }, + }, + // Result: + // * fn { Go(*container.TabItem) } + "Go(*container.DocTabs)//on-unselected?": { + Doc: "Get *container.DocTabs OnUnselected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-unselected?: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-unselected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-unselected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.TabItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-unselected?: arg 1: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-unselected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//on-unselected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.OnUnselected(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*container.DocTabs) + // Result: + // * Go(fyne.position) + "Go(*container.DocTabs)//position": { + Doc: "(*container.DocTabs).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//position: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.DocTabs) + "Go(*container.DocTabs)//refresh": { + Doc: "(*container.DocTabs).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//refresh: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // remove tab by value. + // + // Args: + // * recv - Go(*container.DocTabs) + // * item - Go(*container.TabItem) + "Go(*container.DocTabs)//remove": { + Doc: "(*container.DocTabs).Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//remove: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *container.TabItem + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//remove: arg 2: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//remove: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//remove: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Remove(arg1Val) + return arg0 + }, + }, + // remove-index removes tab by index. + // + // Args: + // * recv - Go(*container.DocTabs) + // * index - integer + "Go(*container.DocTabs)//remove-index": { + Doc: "(*container.DocTabs).RemoveIndex", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//remove-index: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//remove-index: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//remove-index: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//remove-index: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.RemoveIndex(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*container.DocTabs) + // * size - Go(fyne.Size) + "Go(*container.DocTabs)//resize": { + Doc: "(*container.DocTabs).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//resize: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // select sets the specified TabItem to be selected and its content visible. + // + // Args: + // * recv - Go(*container.DocTabs) + // * item - Go(*container.TabItem) + "Go(*container.DocTabs)//select": { + Doc: "(*container.DocTabs).Select", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//select: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//select: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//select: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *container.TabItem + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//select: arg 2: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//select: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//select: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Select(arg1Val) + return arg0 + }, + }, + // select-index sets the TabItem at the specific index to be selected and its content visible. + // + // Args: + // * recv - Go(*container.DocTabs) + // * index - integer + "Go(*container.DocTabs)//select-index": { + Doc: "(*container.DocTabs).SelectIndex", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//select-index: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//select-index: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//select-index: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//select-index: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SelectIndex(arg1Val) + return arg0 + }, + }, + // selected returns the currently selected TabItem. + // + // Args: + // * recv - Go(*container.DocTabs) + // Result: + // * Go(*container.TabItem) + "Go(*container.DocTabs)//selected": { + Doc: "(*container.DocTabs).Selected", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//selected: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//selected: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//selected: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Selected() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.TabItem)") + return res0Obj + }, + }, + // selected-index returns the index of the currently selected TabItem. + // + // Args: + // * recv - Go(*container.DocTabs) + // Result: + // * integer + "Go(*container.DocTabs)//selected-index": { + Doc: "(*container.DocTabs).SelectedIndex", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//selected-index: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//selected-index: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//selected-index: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.SelectedIndex() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // set-items sets the containers items and refreshes. + // + // Args: + // * recv - Go(*container.DocTabs) + // * items - block[Go(*container.TabItem)] + "Go(*container.DocTabs)//set-items": { + Doc: "(*container.DocTabs).SetItems", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//set-items: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//set-items: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//set-items: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []*container.TabItem + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]*container.TabItem, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//set-items: arg 2: " + "block item: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//set-items: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//set-items: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//set-items: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//set-items: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetItems(arg1Val) + return arg0 + }, + }, + // set-tab-location sets the location of the tab bar + // + // Args: + // * recv - Go(*container.DocTabs) + // * l - integer + "Go(*container.DocTabs)//set-tab-location": { + Doc: "(*container.DocTabs).SetTabLocation", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//set-tab-location: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//set-tab-location: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//set-tab-location: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val container.TabLocation + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal container.TabLocation + if natOk { + natVal, natValOk = nat.Value.(container.TabLocation) + } + if natValOk { + arg1Val = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//set-tab-location: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = container.TabLocation(u) + } + } + arg0Val.SetTabLocation(arg1Val) + return arg0 + }, + }, + // show this widget, if it was previously hidden + // + // Implements: fyne.CanvasObject + // + // Args: + // * recv - Go(*container.DocTabs) + "Go(*container.DocTabs)//show": { + Doc: "(*container.DocTabs).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//show: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*container.DocTabs) + // Result: + // * Go(fyne.size) + "Go(*container.DocTabs)//size": { + Doc: "(*container.DocTabs).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//size: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.DocTabs) + // Result: + // * Go(fyne.theme) + "Go(*container.DocTabs)//theme": { + Doc: "(*container.DocTabs).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//theme: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.DocTabs) + // Result: + // * bool + "Go(*container.DocTabs)//visible": { + Doc: "(*container.DocTabs).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.DocTabs + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.DocTabs); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//visible: arg 1: " + "expected native of type *container.DocTabs, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.DocTabs)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*container.InnerWindow)//base-widget!": { + Doc: "Set *container.InnerWindow BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//base-widget!: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*container.InnerWindow)//base-widget?": { + Doc: "Get *container.InnerWindow BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//base-widget?: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + "Go(*container.InnerWindow)//close": { + Doc: "(*container.InnerWindow).Close", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//close: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//close: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//close: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Close() + return arg0 + }, + }, + // Args: + // * close-intercept - fn { } + // Result: + // * fn { } + "Go(*container.InnerWindow)//close-intercept!": { + Doc: "Set *container.InnerWindow CloseIntercept value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//close-intercept!: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//close-intercept!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//close-intercept!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//close-intercept!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//close-intercept!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//close-intercept!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.CloseIntercept = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*container.InnerWindow)//close-intercept?": { + Doc: "Get *container.InnerWindow CloseIntercept value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//close-intercept?: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//close-intercept?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//close-intercept?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.CloseIntercept() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*container.InnerWindow)//create-renderer": { + Doc: "(*container.InnerWindow).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//create-renderer: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + // * wid - Go(fyne.Widget) + "Go(*container.InnerWindow)//extend-base-widget": { + Doc: "(*container.InnerWindow).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//extend-base-widget: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*container.InnerWindow)//hidden!": { + Doc: "Set *container.InnerWindow Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//hidden!: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*container.InnerWindow)//hidden?": { + Doc: "Get *container.InnerWindow Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//hidden?: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + "Go(*container.InnerWindow)//hide": { + Doc: "(*container.InnerWindow).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//hide: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * icon - Go(fyne.Resource) + // Result: + // * Go(fyne.Resource) + "Go(*container.InnerWindow)//icon!": { + Doc: "Set *container.InnerWindow Icon value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//icon!: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//icon!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//icon!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//icon!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//icon!: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//icon!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//icon!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Icon = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Resource) + "Go(*container.InnerWindow)//icon?": { + Doc: "Get *container.InnerWindow Icon value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//icon?: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//icon?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//icon?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Icon, "Go(fyne.Resource)") + return resObj + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + // Result: + // * Go(fyne.Size) + "Go(*container.InnerWindow)//min-size": { + Doc: "(*container.InnerWindow).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//min-size: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + // * pos - Go(fyne.Position) + "Go(*container.InnerWindow)//move": { + Doc: "(*container.InnerWindow).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//move: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-dragged - fn { Go(*fyne.DragEvent) } + // Result: + // * fn { Go(*fyne.DragEvent) } + "Go(*container.InnerWindow)//on-dragged!": { + Doc: "Set *container.InnerWindow OnDragged value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-dragged!: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-dragged!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-dragged!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(*fyne.DragEvent) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-dragged!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 *fyne.DragEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.DragEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-dragged!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-dragged!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnDragged = newVal + return arg0 + }, + }, + // Result: + // * fn { Go(*fyne.DragEvent) } + "Go(*container.InnerWindow)//on-dragged?": { + Doc: "Get *container.InnerWindow OnDragged value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-dragged?: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-dragged?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-dragged?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.DragEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.DragEvent); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-dragged?: arg 1: " + "expected native of type *fyne.DragEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-dragged?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-dragged?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.OnDragged(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-maximized - fn { } + // Result: + // * fn { } + "Go(*container.InnerWindow)//on-maximized!": { + Doc: "Set *container.InnerWindow OnMaximized value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-maximized!: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-maximized!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-maximized!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-maximized!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-maximized!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-maximized!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnMaximized = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*container.InnerWindow)//on-maximized?": { + Doc: "Get *container.InnerWindow OnMaximized value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-maximized?: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-maximized?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-maximized?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.OnMaximized() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-minimized - fn { } + // Result: + // * fn { } + "Go(*container.InnerWindow)//on-minimized!": { + Doc: "Set *container.InnerWindow OnMinimized value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-minimized!: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-minimized!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-minimized!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-minimized!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-minimized!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-minimized!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnMinimized = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*container.InnerWindow)//on-minimized?": { + Doc: "Get *container.InnerWindow OnMinimized value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-minimized?: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-minimized?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-minimized?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.OnMinimized() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-resized - fn { Go(*fyne.DragEvent) } + // Result: + // * fn { Go(*fyne.DragEvent) } + "Go(*container.InnerWindow)//on-resized!": { + Doc: "Set *container.InnerWindow OnResized value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-resized!: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-resized!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-resized!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(*fyne.DragEvent) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-resized!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 *fyne.DragEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.DragEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-resized!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-resized!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnResized = newVal + return arg0 + }, + }, + // Result: + // * fn { Go(*fyne.DragEvent) } + "Go(*container.InnerWindow)//on-resized?": { + Doc: "Get *container.InnerWindow OnResized value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-resized?: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-resized?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-resized?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.DragEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.DragEvent); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-resized?: arg 1: " + "expected native of type *fyne.DragEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-resized?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-resized?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.OnResized(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-tapped-bar - fn { } + // Result: + // * fn { } + "Go(*container.InnerWindow)//on-tapped-bar!": { + Doc: "Set *container.InnerWindow OnTappedBar value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-bar!: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-bar!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-bar!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-bar!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-bar!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-bar!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnTappedBar = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*container.InnerWindow)//on-tapped-bar?": { + Doc: "Get *container.InnerWindow OnTappedBar value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-bar?: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-bar?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-bar?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.OnTappedBar() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-tapped-icon - fn { } + // Result: + // * fn { } + "Go(*container.InnerWindow)//on-tapped-icon!": { + Doc: "Set *container.InnerWindow OnTappedIcon value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-icon!: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-icon!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-icon!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-icon!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-icon!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-icon!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnTappedIcon = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*container.InnerWindow)//on-tapped-icon?": { + Doc: "Get *container.InnerWindow OnTappedIcon value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-icon?: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-icon?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//on-tapped-icon?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.OnTappedIcon() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + // Result: + // * Go(fyne.position) + "Go(*container.InnerWindow)//position": { + Doc: "(*container.InnerWindow).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//position: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + "Go(*container.InnerWindow)//refresh": { + Doc: "(*container.InnerWindow).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//refresh: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + // * size - Go(fyne.Size) + "Go(*container.InnerWindow)//resize": { + Doc: "(*container.InnerWindow).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//resize: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + // * obj - Go(fyne.CanvasObject) + "Go(*container.InnerWindow)//set-content": { + Doc: "(*container.InnerWindow).SetContent", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//set-content: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//set-content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//set-content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//set-content: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//set-content: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//set-content: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//set-content: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetContent(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + // * pad - bool + "Go(*container.InnerWindow)//set-padded": { + Doc: "(*container.InnerWindow).SetPadded", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//set-padded: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//set-padded: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//set-padded: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//set-padded: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetPadded(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + // * title - string + "Go(*container.InnerWindow)//set-title": { + Doc: "(*container.InnerWindow).SetTitle", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//set-title: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//set-title: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//set-title: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//set-title: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetTitle(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + "Go(*container.InnerWindow)//show": { + Doc: "(*container.InnerWindow).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//show: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + // Result: + // * Go(fyne.size) + "Go(*container.InnerWindow)//size": { + Doc: "(*container.InnerWindow).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//size: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + // Result: + // * Go(fyne.theme) + "Go(*container.InnerWindow)//theme": { + Doc: "(*container.InnerWindow).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//theme: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.InnerWindow) + // Result: + // * bool + "Go(*container.InnerWindow)//visible": { + Doc: "(*container.InnerWindow).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.InnerWindow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//visible: arg 1: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.InnerWindow)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.MultipleWindows) + // * w - Go(*container.InnerWindow) + "Go(*container.MultipleWindows)//add": { + Doc: "(*container.MultipleWindows).Add", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//add: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//add: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//add: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *container.InnerWindow + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//add: arg 2: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//add: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//add: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Add(arg1Val) + return arg0 + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*container.MultipleWindows)//base-widget!": { + Doc: "Set *container.MultipleWindows BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//base-widget!: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*container.MultipleWindows)//base-widget?": { + Doc: "Get *container.MultipleWindows BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//base-widget?: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // Args: + // * recv - Go(*container.MultipleWindows) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*container.MultipleWindows)//create-renderer": { + Doc: "(*container.MultipleWindows).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//create-renderer: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.MultipleWindows) + // * wid - Go(fyne.Widget) + "Go(*container.MultipleWindows)//extend-base-widget": { + Doc: "(*container.MultipleWindows).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//extend-base-widget: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*container.MultipleWindows)//hidden!": { + Doc: "Set *container.MultipleWindows Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//hidden!: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*container.MultipleWindows)//hidden?": { + Doc: "Get *container.MultipleWindows Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//hidden?: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*container.MultipleWindows) + "Go(*container.MultipleWindows)//hide": { + Doc: "(*container.MultipleWindows).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//hide: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * recv - Go(*container.MultipleWindows) + // Result: + // * Go(fyne.Size) + "Go(*container.MultipleWindows)//min-size": { + Doc: "(*container.MultipleWindows).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//min-size: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.MultipleWindows) + // * pos - Go(fyne.Position) + "Go(*container.MultipleWindows)//move": { + Doc: "(*container.MultipleWindows).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//move: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*container.MultipleWindows) + // Result: + // * Go(fyne.position) + "Go(*container.MultipleWindows)//position": { + Doc: "(*container.MultipleWindows).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//position: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.MultipleWindows) + "Go(*container.MultipleWindows)//refresh": { + Doc: "(*container.MultipleWindows).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//refresh: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*container.MultipleWindows) + // * size - Go(fyne.Size) + "Go(*container.MultipleWindows)//resize": { + Doc: "(*container.MultipleWindows).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//resize: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*container.MultipleWindows) + "Go(*container.MultipleWindows)//show": { + Doc: "(*container.MultipleWindows).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//show: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*container.MultipleWindows) + // Result: + // * Go(fyne.size) + "Go(*container.MultipleWindows)//size": { + Doc: "(*container.MultipleWindows).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//size: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.MultipleWindows) + // Result: + // * Go(fyne.theme) + "Go(*container.MultipleWindows)//theme": { + Doc: "(*container.MultipleWindows).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//theme: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.MultipleWindows) + // Result: + // * bool + "Go(*container.MultipleWindows)//visible": { + Doc: "(*container.MultipleWindows).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//visible: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * windows - block[Go(*container.InnerWindow)] + // Result: + // * block[Go(*container.InnerWindow)] + "Go(*container.MultipleWindows)//windows!": { + Doc: "Set *container.MultipleWindows Windows value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//windows!: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//windows!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//windows!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []*container.InnerWindow + switch v := arg1.(type) { + case env.Block: + newVal = make([]*container.InnerWindow, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//windows!: arg 2: " + "block item: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//windows!: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//windows!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//windows!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//windows!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Windows = newVal + return arg0 + }, + }, + // Result: + // * block[Go(*container.InnerWindow)] + "Go(*container.MultipleWindows)//windows?": { + Doc: "Get *container.MultipleWindows Windows value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.MultipleWindows + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.MultipleWindows); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//windows?: arg 1: " + "expected native of type *container.MultipleWindows, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//windows?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.MultipleWindows)//windows?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Windows)) + for i, it := range self.Windows { + items[i] = *env.NewNative(ps.Idx, it, "Go(*container.InnerWindow)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*container.Split)//base-widget!": { + Doc: "Set *container.Split BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//base-widget!: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*container.Split)//base-widget?": { + Doc: "Get *container.Split BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//base-widget?: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*container.Split) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*container.Split)//create-renderer": { + Doc: "(*container.Split).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//create-renderer: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // extend-base-widget is used by an extending widget to make use of BaseWidget functionality. + // + // Deprecated: Support for extending containers is being removed + // + // Args: + // * recv - Go(*container.Split) + // * wid - Go(fyne.Widget) + "Go(*container.Split)//extend-base-widget": { + Doc: "(*container.Split).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//extend-base-widget: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*container.Split)//hidden!": { + Doc: "Set *container.Split Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//hidden!: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*container.Split)//hidden?": { + Doc: "Get *container.Split Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//hidden?: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*container.Split) + "Go(*container.Split)//hide": { + Doc: "(*container.Split).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//hide: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * horizontal - bool + // Result: + // * bool + "Go(*container.Split)//horizontal!": { + Doc: "Set *container.Split Horizontal value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//horizontal!: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//horizontal!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//horizontal!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//horizontal!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Horizontal = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*container.Split)//horizontal?": { + Doc: "Get *container.Split Horizontal value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//horizontal?: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//horizontal?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//horizontal?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Horizontal)) + return resObj + }, + }, + // Args: + // * leading - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.CanvasObject) + "Go(*container.Split)//leading!": { + Doc: "Set *container.Split Leading value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//leading!: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//leading!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//leading!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//leading!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//leading!: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//leading!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//leading!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Leading = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.CanvasObject) + "Go(*container.Split)//leading?": { + Doc: "Get *container.Split Leading value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//leading?: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//leading?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//leading?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Leading, "Go(fyne.CanvasObject)") + return resObj + }, + }, + // Args: + // * recv - Go(*container.Split) + // Result: + // * Go(fyne.Size) + "Go(*container.Split)//min-size": { + Doc: "(*container.Split).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//min-size: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.Split) + // * pos - Go(fyne.Position) + "Go(*container.Split)//move": { + Doc: "(*container.Split).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//move: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * offset - decimal + // Result: + // * decimal + "Go(*container.Split)//offset!": { + Doc: "Set *container.Split Offset value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//offset!: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//offset!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//offset!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float64 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//offset!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Offset = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*container.Split)//offset?": { + Doc: "Get *container.Split Offset value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//offset?: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//offset?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//offset?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.Offset)) + return resObj + }, + }, + // Args: + // * recv - Go(*container.Split) + // Result: + // * Go(fyne.position) + "Go(*container.Split)//position": { + Doc: "(*container.Split).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//position: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.Split) + "Go(*container.Split)//refresh": { + Doc: "(*container.Split).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//refresh: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*container.Split) + // * size - Go(fyne.Size) + "Go(*container.Split)//resize": { + Doc: "(*container.Split).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//resize: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // set-offset sets the offset (0.0 to 1.0) of the Split divider. + // 0.0 - Leading is min size, Trailing uses all remaining space. + // 0.5 - Leading & Trailing equally share the available space. + // 1.0 - Trailing is min size, Leading uses all remaining space. + // + // Args: + // * recv - Go(*container.Split) + // * offset - decimal + "Go(*container.Split)//set-offset": { + Doc: "(*container.Split).SetOffset", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//set-offset: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//set-offset: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//set-offset: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float64 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//set-offset: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetOffset(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*container.Split) + "Go(*container.Split)//show": { + Doc: "(*container.Split).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//show: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*container.Split) + // Result: + // * Go(fyne.size) + "Go(*container.Split)//size": { + Doc: "(*container.Split).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//size: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.Split) + // Result: + // * Go(fyne.theme) + "Go(*container.Split)//theme": { + Doc: "(*container.Split).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//theme: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * trailing - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.CanvasObject) + "Go(*container.Split)//trailing!": { + Doc: "Set *container.Split Trailing value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//trailing!: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//trailing!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//trailing!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//trailing!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//trailing!: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//trailing!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//trailing!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Trailing = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.CanvasObject) + "Go(*container.Split)//trailing?": { + Doc: "Get *container.Split Trailing value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//trailing?: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//trailing?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//trailing?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Trailing, "Go(fyne.CanvasObject)") + return resObj + }, + }, + // Args: + // * recv - Go(*container.Split) + // Result: + // * bool + "Go(*container.Split)//visible": { + Doc: "(*container.Split).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.Split + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.Split); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//visible: arg 1: " + "expected native of type *container.Split, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.Split)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * content - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.CanvasObject) + "Go(*container.TabItem)//content!": { + Doc: "Set *container.TabItem Content value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.TabItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//content!: arg 1: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//content!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//content!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//content!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//content!: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//content!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//content!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Content = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.CanvasObject) + "Go(*container.TabItem)//content?": { + Doc: "Get *container.TabItem Content value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.TabItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//content?: arg 1: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//content?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//content?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Content, "Go(fyne.CanvasObject)") + return resObj + }, + }, + // disabled returns whether or not the TabItem is disabled. + // + // Since: 2.3 + // + // Args: + // * recv - Go(*container.TabItem) + // Result: + // * bool + "Go(*container.TabItem)//disabled": { + Doc: "(*container.TabItem).Disabled", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.TabItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//disabled: arg 1: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//disabled: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//disabled: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Disabled() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * icon - Go(fyne.Resource) + // Result: + // * Go(fyne.Resource) + "Go(*container.TabItem)//icon!": { + Doc: "Set *container.TabItem Icon value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.TabItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//icon!: arg 1: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//icon!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//icon!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//icon!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//icon!: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//icon!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//icon!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Icon = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Resource) + "Go(*container.TabItem)//icon?": { + Doc: "Get *container.TabItem Icon value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.TabItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//icon?: arg 1: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//icon?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//icon?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Icon, "Go(fyne.Resource)") + return resObj + }, + }, + // Args: + // * text - string + // Result: + // * string + "Go(*container.TabItem)//text!": { + Doc: "Set *container.TabItem Text value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.TabItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//text!: arg 1: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//text!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//text!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//text!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Text = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*container.TabItem)//text?": { + Doc: "Get *container.TabItem Text value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.TabItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//text?: arg 1: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//text?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.TabItem)//text?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Text) + return resObj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*container.ThemeOverride)//base-widget!": { + Doc: "Set *container.ThemeOverride BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//base-widget!: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*container.ThemeOverride)//base-widget?": { + Doc: "Get *container.ThemeOverride BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//base-widget?: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // Args: + // * content - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.CanvasObject) + "Go(*container.ThemeOverride)//content!": { + Doc: "Set *container.ThemeOverride Content value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//content!: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//content!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//content!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//content!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//content!: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//content!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//content!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Content = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.CanvasObject) + "Go(*container.ThemeOverride)//content?": { + Doc: "Get *container.ThemeOverride Content value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//content?: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//content?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//content?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Content, "Go(fyne.CanvasObject)") + return resObj + }, + }, + // Args: + // * recv - Go(*container.ThemeOverride) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*container.ThemeOverride)//create-renderer": { + Doc: "(*container.ThemeOverride).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//create-renderer: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.ThemeOverride) + // * wid - Go(fyne.Widget) + "Go(*container.ThemeOverride)//extend-base-widget": { + Doc: "(*container.ThemeOverride).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//extend-base-widget: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*container.ThemeOverride)//hidden!": { + Doc: "Set *container.ThemeOverride Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//hidden!: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*container.ThemeOverride)//hidden?": { + Doc: "Get *container.ThemeOverride Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//hidden?: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*container.ThemeOverride) + "Go(*container.ThemeOverride)//hide": { + Doc: "(*container.ThemeOverride).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//hide: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * recv - Go(*container.ThemeOverride) + // Result: + // * Go(fyne.Size) + "Go(*container.ThemeOverride)//min-size": { + Doc: "(*container.ThemeOverride).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//min-size: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.ThemeOverride) + // * pos - Go(fyne.Position) + "Go(*container.ThemeOverride)//move": { + Doc: "(*container.ThemeOverride).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//move: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*container.ThemeOverride) + // Result: + // * Go(fyne.position) + "Go(*container.ThemeOverride)//position": { + Doc: "(*container.ThemeOverride).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//position: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*container.ThemeOverride) + "Go(*container.ThemeOverride)//refresh": { + Doc: "(*container.ThemeOverride).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//refresh: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*container.ThemeOverride) + // * size - Go(fyne.Size) + "Go(*container.ThemeOverride)//resize": { + Doc: "(*container.ThemeOverride).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//resize: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*container.ThemeOverride) + "Go(*container.ThemeOverride)//show": { + Doc: "(*container.ThemeOverride).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//show: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*container.ThemeOverride) + // Result: + // * Go(fyne.size) + "Go(*container.ThemeOverride)//size": { + Doc: "(*container.ThemeOverride).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//size: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * theme - Go(fyne.Theme) + // Result: + // * Go(fyne.Theme) + "Go(*container.ThemeOverride)//theme!": { + Doc: "Set *container.ThemeOverride Theme value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//theme!: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//theme!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//theme!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Theme + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Theme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//theme!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Theme); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//theme!: arg 2: " + "expected native of type fyne.Theme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//theme!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//theme!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Theme = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Theme) + "Go(*container.ThemeOverride)//theme?": { + Doc: "Get *container.ThemeOverride Theme value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//theme?: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//theme?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//theme?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Theme, "Go(fyne.Theme)") + return resObj + }, + }, + // Args: + // * recv - Go(*container.ThemeOverride) + // Result: + // * bool + "Go(*container.ThemeOverride)//visible": { + Doc: "(*container.ThemeOverride).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *container.ThemeOverride + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*container.ThemeOverride); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//visible: arg 1: " + "expected native of type *container.ThemeOverride, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*container.ThemeOverride)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // key returns the key name of this shortcut. + // @implements keyboardShortcut + // + // Args: + // * recv - Go(*desktop.CustomShortcut) + // Result: + // * string + "Go(*desktop.CustomShortcut)//key": { + Doc: "(*desktop.CustomShortcut).Key", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *desktop.CustomShortcut + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.CustomShortcut); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//key: arg 1: " + "expected native of type *desktop.CustomShortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Key() + var res0Obj env.Object + res0Obj = *env.NewString(string(res0)) + return res0Obj + }, + }, + // Args: + // * key-name - string + // Result: + // * string + "Go(*desktop.CustomShortcut)//key-name!": { + Doc: "Set *desktop.CustomShortcut KeyName value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *desktop.CustomShortcut + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.CustomShortcut); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//key-name!: arg 1: " + "expected native of type *desktop.CustomShortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//key-name!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//key-name!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.KeyName + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.KeyName + if natOk { + natVal, natValOk = nat.Value.(fyne.KeyName) + } + if natValOk { + newVal = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//key-name!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.KeyName(u) + } + } + self.KeyName = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*desktop.CustomShortcut)//key-name?": { + Doc: "Get *desktop.CustomShortcut KeyName value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *desktop.CustomShortcut + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.CustomShortcut); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//key-name?: arg 1: " + "expected native of type *desktop.CustomShortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//key-name?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//key-name?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(string(self.KeyName)) + return resObj + }, + }, + // mod returns the modifier of this shortcut. + // @implements KeyboardShortcut + // + // Args: + // * recv - Go(*desktop.CustomShortcut) + // Result: + // * integer + "Go(*desktop.CustomShortcut)//mod": { + Doc: "(*desktop.CustomShortcut).Mod", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *desktop.CustomShortcut + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.CustomShortcut); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//mod: arg 1: " + "expected native of type *desktop.CustomShortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//mod: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//mod: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Mod() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(int(res0))) + return res0Obj + }, + }, + // Args: + // * modifier - integer + // Result: + // * integer + "Go(*desktop.CustomShortcut)//modifier!": { + Doc: "Set *desktop.CustomShortcut Modifier value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *desktop.CustomShortcut + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.CustomShortcut); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//modifier!: arg 1: " + "expected native of type *desktop.CustomShortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//modifier!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//modifier!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.KeyModifier + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.KeyModifier + if natOk { + natVal, natValOk = nat.Value.(fyne.KeyModifier) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//modifier!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.KeyModifier(u) + } + } + self.Modifier = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*desktop.CustomShortcut)//modifier?": { + Doc: "Get *desktop.CustomShortcut Modifier value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *desktop.CustomShortcut + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.CustomShortcut); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//modifier?: arg 1: " + "expected native of type *desktop.CustomShortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//modifier?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//modifier?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Modifier))) + return resObj + }, + }, + // shortcut-name returns the shortcut name associated to the event + // + // Args: + // * recv - Go(*desktop.CustomShortcut) + // Result: + // * string + "Go(*desktop.CustomShortcut)//shortcut-name": { + Doc: "(*desktop.CustomShortcut).ShortcutName", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *desktop.CustomShortcut + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.CustomShortcut); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//shortcut-name: arg 1: " + "expected native of type *desktop.CustomShortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//shortcut-name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.CustomShortcut)//shortcut-name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ShortcutName() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * absolute-position - Go(fyne.Position) + // Result: + // * Go(fyne.Position) + "Go(*desktop.MouseEvent)//absolute-position!": { + Doc: "Set *desktop.MouseEvent AbsolutePosition value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *desktop.MouseEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//absolute-position!: arg 1: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//absolute-position!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//absolute-position!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//absolute-position!: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//absolute-position!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//absolute-position!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.AbsolutePosition = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Position) + "Go(*desktop.MouseEvent)//absolute-position?": { + Doc: "Get *desktop.MouseEvent AbsolutePosition value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *desktop.MouseEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//absolute-position?: arg 1: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//absolute-position?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//absolute-position?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.AbsolutePosition, "Go(*fyne.Position)") + return resObj + }, + }, + // Args: + // * button - integer + // Result: + // * integer + "Go(*desktop.MouseEvent)//button!": { + Doc: "Set *desktop.MouseEvent Button value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *desktop.MouseEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//button!: arg 1: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//button!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//button!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal desktop.MouseButton + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal desktop.MouseButton + if natOk { + natVal, natValOk = nat.Value.(desktop.MouseButton) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//button!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = desktop.MouseButton(u) + } + } + self.Button = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*desktop.MouseEvent)//button?": { + Doc: "Get *desktop.MouseEvent Button value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *desktop.MouseEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//button?: arg 1: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//button?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//button?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Button))) + return resObj + }, + }, + // Args: + // * modifier - integer + // Result: + // * integer + "Go(*desktop.MouseEvent)//modifier!": { + Doc: "Set *desktop.MouseEvent Modifier value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *desktop.MouseEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//modifier!: arg 1: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//modifier!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//modifier!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.KeyModifier + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.KeyModifier + if natOk { + natVal, natValOk = nat.Value.(fyne.KeyModifier) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//modifier!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.KeyModifier(u) + } + } + self.Modifier = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*desktop.MouseEvent)//modifier?": { + Doc: "Get *desktop.MouseEvent Modifier value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *desktop.MouseEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//modifier?: arg 1: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//modifier?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//modifier?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Modifier))) + return resObj + }, + }, + // Args: + // * point-event - Go(fyne.PointEvent) + // Result: + // * Go(fyne.PointEvent) + "Go(*desktop.MouseEvent)//point-event!": { + Doc: "Set *desktop.MouseEvent PointEvent value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *desktop.MouseEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//point-event!: arg 1: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//point-event!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//point-event!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//point-event!: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//point-event!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//point-event!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.PointEvent = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.PointEvent) + "Go(*desktop.MouseEvent)//point-event?": { + Doc: "Get *desktop.MouseEvent PointEvent value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *desktop.MouseEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//point-event?: arg 1: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//point-event?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//point-event?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.PointEvent, "Go(*fyne.PointEvent)") + return resObj + }, + }, + // Args: + // * position - Go(fyne.Position) + // Result: + // * Go(fyne.Position) + "Go(*desktop.MouseEvent)//position!": { + Doc: "Set *desktop.MouseEvent Position value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *desktop.MouseEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//position!: arg 1: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//position!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//position!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//position!: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//position!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//position!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Position = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Position) + "Go(*desktop.MouseEvent)//position?": { + Doc: "Get *desktop.MouseEvent Position value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *desktop.MouseEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//position?: arg 1: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//position?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*desktop.MouseEvent)//position?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.Position, "Go(*fyne.Position)") + return resObj + }, + }, + // Args: + // * advanced - bool + // Result: + // * bool + "Go(*dialog.ColorPickerDialog)//advanced!": { + Doc: "Set *dialog.ColorPickerDialog Advanced value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *dialog.ColorPickerDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.ColorPickerDialog); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//advanced!: arg 1: " + "expected native of type *dialog.ColorPickerDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//advanced!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//advanced!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//advanced!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Advanced = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*dialog.ColorPickerDialog)//advanced?": { + Doc: "Get *dialog.ColorPickerDialog Advanced value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *dialog.ColorPickerDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.ColorPickerDialog); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//advanced?: arg 1: " + "expected native of type *dialog.ColorPickerDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//advanced?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//advanced?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Advanced)) + return resObj + }, + }, + // refresh causes this dialog to be updated + // + // Args: + // * recv - Go(*dialog.ColorPickerDialog) + "Go(*dialog.ColorPickerDialog)//refresh": { + Doc: "(*dialog.ColorPickerDialog).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.ColorPickerDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.ColorPickerDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//refresh: arg 1: " + "expected native of type *dialog.ColorPickerDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // set-color updates the color of the color picker. + // + // Args: + // * recv - Go(*dialog.ColorPickerDialog) + // * c - Go(color.Color) + "Go(*dialog.ColorPickerDialog)//set-color": { + Doc: "(*dialog.ColorPickerDialog).SetColor", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.ColorPickerDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.ColorPickerDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//set-color: arg 1: " + "expected native of type *dialog.ColorPickerDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//set-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//set-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//set-color: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//set-color: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetColor(arg1Val) + return arg0 + }, + }, + // show causes this dialog to be displayed + // + // Args: + // * recv - Go(*dialog.ColorPickerDialog) + "Go(*dialog.ColorPickerDialog)//show": { + Doc: "(*dialog.ColorPickerDialog).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.ColorPickerDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.ColorPickerDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//show: arg 1: " + "expected native of type *dialog.ColorPickerDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.ColorPickerDialog)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // set-confirm-importance sets the importance level of the confirm button. + // + // Since 2.4 + // + // Args: + // * recv - Go(*dialog.ConfirmDialog) + // * importance - integer + "Go(*dialog.ConfirmDialog)//set-confirm-importance": { + Doc: "(*dialog.ConfirmDialog).SetConfirmImportance", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.ConfirmDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.ConfirmDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ConfirmDialog)//set-confirm-importance: arg 1: " + "expected native of type *dialog.ConfirmDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ConfirmDialog)//set-confirm-importance: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.ConfirmDialog)//set-confirm-importance: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.Importance + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.Importance + if natOk { + natVal, natValOk = nat.Value.(widget.Importance) + } + if natValOk { + arg1Val = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ConfirmDialog)//set-confirm-importance: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.Importance(u) + } + } + arg0Val.SetConfirmImportance(arg1Val) + return arg0 + }, + }, + // set-confirm-text allows custom text to be set in the confirmation button + // + // Args: + // * recv - Go(*dialog.ConfirmDialog) + // * label - string + "Go(*dialog.ConfirmDialog)//set-confirm-text": { + Doc: "(*dialog.ConfirmDialog).SetConfirmText", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.ConfirmDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.ConfirmDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ConfirmDialog)//set-confirm-text: arg 1: " + "expected native of type *dialog.ConfirmDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ConfirmDialog)//set-confirm-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.ConfirmDialog)//set-confirm-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ConfirmDialog)//set-confirm-text: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetConfirmText(arg1Val) + return arg0 + }, + }, + // set-buttons sets the row of buttons at the bottom of the dialog. + // Passing an empy slice will result in a dialog with no buttons. + // + // Since: 2.4 + // + // Args: + // * recv - Go(*dialog.CustomDialog) + // * buttons - block[Go(fyne.CanvasObject)] + "Go(*dialog.CustomDialog)//set-buttons": { + Doc: "(*dialog.CustomDialog).SetButtons", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.CustomDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.CustomDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.CustomDialog)//set-buttons: arg 1: " + "expected native of type *dialog.CustomDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.CustomDialog)//set-buttons: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.CustomDialog)//set-buttons: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []fyne.CanvasObject + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*dialog.CustomDialog)//set-buttons: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.CustomDialog)//set-buttons: arg 2: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.CustomDialog)//set-buttons: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.CustomDialog)//set-buttons: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.CustomDialog)//set-buttons: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.CustomDialog)//set-buttons: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetButtons(arg1Val) + return arg0 + }, + }, + // Args: + // * form-dialog - Go(*dialog.FormDialog) + // Result: + // * Go(*dialog.FormDialog) + "Go(*dialog.EntryDialog)//form-dialog!": { + Doc: "Set *dialog.EntryDialog FormDialog value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *dialog.EntryDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.EntryDialog); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//form-dialog!: arg 1: " + "expected native of type *dialog.EntryDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//form-dialog!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//form-dialog!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *dialog.FormDialog + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.FormDialog); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//form-dialog!: arg 2: " + "expected native of type *dialog.FormDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//form-dialog!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//form-dialog!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.FormDialog = newVal + return arg0 + }, + }, + // Result: + // * Go(*dialog.FormDialog) + "Go(*dialog.EntryDialog)//form-dialog?": { + Doc: "Get *dialog.EntryDialog FormDialog value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *dialog.EntryDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.EntryDialog); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//form-dialog?: arg 1: " + "expected native of type *dialog.EntryDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//form-dialog?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//form-dialog?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.FormDialog, "Go(*dialog.FormDialog)") + return resObj + }, + }, + // set-on-closed changes the callback which is run when the dialog is closed, + // which is nil by default. + // + // The callback is called unconditionally whether the user confirms or cancels. + // + // Note that the callback will be called after onConfirm, if both are non-nil. + // This way onConfirm can potential modify state that this callback needs to + // get the user input when the user confirms, while also being able to handle + // the case where the user cancelled. + // + // Args: + // * recv - Go(*dialog.EntryDialog) + // * callback - fn { } + "Go(*dialog.EntryDialog)//set-on-closed": { + Doc: "(*dialog.EntryDialog).SetOnClosed", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.EntryDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.EntryDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//set-on-closed: arg 1: " + "expected native of type *dialog.EntryDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//set-on-closed: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//set-on-closed: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//set-on-closed: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//set-on-closed: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//set-on-closed: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnClosed(arg1Val) + return arg0 + }, + }, + // set-placeholder defines the placeholder text for the entry + // + // Args: + // * recv - Go(*dialog.EntryDialog) + // * s - string + "Go(*dialog.EntryDialog)//set-placeholder": { + Doc: "(*dialog.EntryDialog).SetPlaceholder", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.EntryDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.EntryDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//set-placeholder: arg 1: " + "expected native of type *dialog.EntryDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//set-placeholder: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//set-placeholder: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//set-placeholder: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetPlaceholder(arg1Val) + return arg0 + }, + }, + // set-text changes the current text value of the entry dialog, this can + // be useful for setting a default value. + // + // Args: + // * recv - Go(*dialog.EntryDialog) + // * s - string + "Go(*dialog.EntryDialog)//set-text": { + Doc: "(*dialog.EntryDialog).SetText", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.EntryDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.EntryDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//set-text: arg 1: " + "expected native of type *dialog.EntryDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//set-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//set-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//set-text: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetText(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*dialog.EntryDialog) + "Go(*dialog.EntryDialog)//submit": { + Doc: "(*dialog.EntryDialog).Submit", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.EntryDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.EntryDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//submit: arg 1: " + "expected native of type *dialog.EntryDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//submit: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.EntryDialog)//submit: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Submit() + return arg0 + }, + }, + // hide hides the file dialog. + // + // Args: + // * recv - Go(*dialog.FileDialog) + "Go(*dialog.FileDialog)//hide": { + Doc: "(*dialog.FileDialog).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.FileDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.FileDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//hide: arg 1: " + "expected native of type *dialog.FileDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size returns the size that this dialog should not shrink below + // + // Since: 2.1 + // + // Args: + // * recv - Go(*dialog.FileDialog) + // Result: + // * Go(fyne.Size) + "Go(*dialog.FileDialog)//min-size": { + Doc: "(*dialog.FileDialog).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.FileDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.FileDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//min-size: arg 1: " + "expected native of type *dialog.FileDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // refresh causes this dialog to be updated + // + // Args: + // * recv - Go(*dialog.FileDialog) + "Go(*dialog.FileDialog)//refresh": { + Doc: "(*dialog.FileDialog).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.FileDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.FileDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//refresh: arg 1: " + "expected native of type *dialog.FileDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize dialog to the requested size, if there is sufficient space. + // If the parent window is not large enough then the size will be reduced to fit. + // + // Args: + // * recv - Go(*dialog.FileDialog) + // * size - Go(fyne.Size) + "Go(*dialog.FileDialog)//resize": { + Doc: "(*dialog.FileDialog).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.FileDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.FileDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//resize: arg 1: " + "expected native of type *dialog.FileDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // set-confirm-text allows custom text to be set in the confirmation button + // + // Since: 2.2 + // + // Args: + // * recv - Go(*dialog.FileDialog) + // * label - string + "Go(*dialog.FileDialog)//set-confirm-text": { + Doc: "(*dialog.FileDialog).SetConfirmText", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.FileDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.FileDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-confirm-text: arg 1: " + "expected native of type *dialog.FileDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-confirm-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-confirm-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-confirm-text: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetConfirmText(arg1Val) + return arg0 + }, + }, + // set-dismiss-text allows custom text to be set in the dismiss button + // + // Args: + // * recv - Go(*dialog.FileDialog) + // * label - string + "Go(*dialog.FileDialog)//set-dismiss-text": { + Doc: "(*dialog.FileDialog).SetDismissText", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.FileDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.FileDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-dismiss-text: arg 1: " + "expected native of type *dialog.FileDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-dismiss-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-dismiss-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-dismiss-text: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetDismissText(arg1Val) + return arg0 + }, + }, + // set-file-name sets the filename in a FileDialog in save mode. + // This is normally called before the dialog is shown. + // + // Args: + // * recv - Go(*dialog.FileDialog) + // * file-name - string + "Go(*dialog.FileDialog)//set-file-name": { + Doc: "(*dialog.FileDialog).SetFileName", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.FileDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.FileDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-file-name: arg 1: " + "expected native of type *dialog.FileDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-file-name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-file-name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-file-name: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetFileName(arg1Val) + return arg0 + }, + }, + // set-filter sets a filter for limiting files that can be chosen in the file dialog. + // + // Args: + // * recv - Go(*dialog.FileDialog) + // * filter - Go(storage.FileFilter) + "Go(*dialog.FileDialog)//set-filter": { + Doc: "(*dialog.FileDialog).SetFilter", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.FileDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.FileDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-filter: arg 1: " + "expected native of type *dialog.FileDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-filter: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-filter: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val storage.FileFilter + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_storage_FileFilter(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-filter: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(storage.FileFilter); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-filter: arg 2: " + "expected native of type storage.FileFilter, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-filter: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-filter: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetFilter(arg1Val) + return arg0 + }, + }, + // set-location tells this FileDialog which location to display. + // This is normally called before the dialog is shown. + // + // Since: 1.4 + // + // Args: + // * recv - Go(*dialog.FileDialog) + // * u - Go(fyne.ListableURI) + "Go(*dialog.FileDialog)//set-location": { + Doc: "(*dialog.FileDialog).SetLocation", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.FileDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.FileDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-location: arg 1: " + "expected native of type *dialog.FileDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-location: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-location: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.ListableURI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_ListableURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-location: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.ListableURI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-location: arg 2: " + "expected native of type fyne.ListableURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-location: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-location: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetLocation(arg1Val) + return arg0 + }, + }, + // set-on-closed sets a callback function that is called when + // the dialog is closed. + // + // Args: + // * recv - Go(*dialog.FileDialog) + // * closed - fn { } + "Go(*dialog.FileDialog)//set-on-closed": { + Doc: "(*dialog.FileDialog).SetOnClosed", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.FileDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.FileDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-on-closed: arg 1: " + "expected native of type *dialog.FileDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-on-closed: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-on-closed: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-on-closed: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-on-closed: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-on-closed: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnClosed(arg1Val) + return arg0 + }, + }, + // set-view changes the default display view of the FileDialog + // This is normally called before the dialog is shown. + // + // Since: 2.5 + // + // Args: + // * recv - Go(*dialog.FileDialog) + // * v - integer + "Go(*dialog.FileDialog)//set-view": { + Doc: "(*dialog.FileDialog).SetView", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.FileDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.FileDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-view: arg 1: " + "expected native of type *dialog.FileDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-view: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-view: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val dialog.ViewLayout + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal dialog.ViewLayout + if natOk { + natVal, natValOk = nat.Value.(dialog.ViewLayout) + } + if natValOk { + arg1Val = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//set-view: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = dialog.ViewLayout(u) + } + } + arg0Val.SetView(arg1Val) + return arg0 + }, + }, + // show shows the file dialog. + // + // Args: + // * recv - Go(*dialog.FileDialog) + "Go(*dialog.FileDialog)//show": { + Doc: "(*dialog.FileDialog).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.FileDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.FileDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//show: arg 1: " + "expected native of type *dialog.FileDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FileDialog)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // submit will submit the form and then hide the dialog if validation passes. + // + // Since: 2.4 + // + // Args: + // * recv - Go(*dialog.FormDialog) + "Go(*dialog.FormDialog)//submit": { + Doc: "(*dialog.FormDialog).Submit", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.FormDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.FormDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FormDialog)//submit: arg 1: " + "expected native of type *dialog.FormDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.FormDialog)//submit: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.FormDialog)//submit: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Submit() + return arg0 + }, + }, + // set-value updates the value of the progress bar - this should be between 0.0 and 1.0. + // + // Args: + // * recv - Go(*dialog.ProgressDialog) + // * v - decimal + "Go(*dialog.ProgressDialog)//set-value": { + Doc: "(*dialog.ProgressDialog).SetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.ProgressDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.ProgressDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ProgressDialog)//set-value: arg 1: " + "expected native of type *dialog.ProgressDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ProgressDialog)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.ProgressDialog)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float64 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ProgressDialog)//set-value: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetValue(arg1Val) + return arg0 + }, + }, + // hide this dialog and stop the infinite progress goroutine + // + // Args: + // * recv - Go(*dialog.ProgressInfiniteDialog) + "Go(*dialog.ProgressInfiniteDialog)//hide": { + Doc: "(*dialog.ProgressInfiniteDialog).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *dialog.ProgressInfiniteDialog + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*dialog.ProgressInfiniteDialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ProgressInfiniteDialog)//hide: arg 1: " + "expected native of type *dialog.ProgressInfiniteDialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*dialog.ProgressInfiniteDialog)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*dialog.ProgressInfiniteDialog)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * auto-reverse - bool + // Result: + // * bool + "Go(*fyne.Animation)//auto-reverse!": { + Doc: "Set *fyne.Animation AutoReverse value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Animation + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Animation); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//auto-reverse!: arg 1: " + "expected native of type *fyne.Animation, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//auto-reverse!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//auto-reverse!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//auto-reverse!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.AutoReverse = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*fyne.Animation)//auto-reverse?": { + Doc: "Get *fyne.Animation AutoReverse value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Animation + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Animation); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//auto-reverse?: arg 1: " + "expected native of type *fyne.Animation, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//auto-reverse?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//auto-reverse?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.AutoReverse)) + return resObj + }, + }, + // Args: + // * curve - fn { decimal } -> decimal + // Result: + // * fn { decimal } -> decimal + "Go(*fyne.Animation)//curve!": { + Doc: "Set *fyne.Animation Curve value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Animation + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Animation); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//curve!: arg 1: " + "expected native of type *fyne.Animation, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//curve!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//curve!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.AnimationCurve + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.AnimationCurve + if natOk { + natVal, natValOk = nat.Value.(fyne.AnimationCurve) + } + if natValOk { + newVal = natVal + } else { + var u func(float32) float32 + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//curve!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + u = func(farg0 float32) float32 { + var farg0Val env.Object + farg0Val = *env.NewDecimal(float64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res float32 + if vc, ok := ps.Res.(env.Decimal); ok { + res = float32(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*fyne.Animation)//curve!: arg 2: callback result: "+"expected decimal, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//curve!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + u = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//curve!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + newVal = fyne.AnimationCurve(u) + } + } + self.Curve = newVal + return arg0 + }, + }, + // Result: + // * fn { decimal } -> decimal + "Go(*fyne.Animation)//curve?": { + Doc: "Get *fyne.Animation Curve value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Animation + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Animation); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//curve?: arg 1: " + "expected native of type *fyne.Animation, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//curve?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//curve?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float32 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//curve?: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := (func(float32) float32)(self.Curve)(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * duration - Go(time.Duration) + // Result: + // * Go(time.Duration) + "Go(*fyne.Animation)//duration!": { + Doc: "Set *fyne.Animation Duration value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Animation + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Animation); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//duration!: arg 1: " + "expected native of type *fyne.Animation, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//duration!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//duration!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal time.Duration + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(time.Duration); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//duration!: arg 2: " + "expected native of type time.Duration, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//duration!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Duration = newVal + return arg0 + }, + }, + // Result: + // * Go(time.Duration) + "Go(*fyne.Animation)//duration?": { + Doc: "Get *fyne.Animation Duration value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Animation + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Animation); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//duration?: arg 1: " + "expected native of type *fyne.Animation, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//duration?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//duration?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.Duration, "Go(time.Duration)") + return resObj + }, + }, + // Args: + // * repeat-count - integer + // Result: + // * integer + "Go(*fyne.Animation)//repeat-count!": { + Doc: "Set *fyne.Animation RepeatCount value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Animation + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Animation); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//repeat-count!: arg 1: " + "expected native of type *fyne.Animation, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//repeat-count!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//repeat-count!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal int + if vc, ok := arg1.(env.Integer); ok { + newVal = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//repeat-count!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.RepeatCount = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*fyne.Animation)//repeat-count?": { + Doc: "Get *fyne.Animation RepeatCount value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Animation + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Animation); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//repeat-count?: arg 1: " + "expected native of type *fyne.Animation, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//repeat-count?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//repeat-count?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(self.RepeatCount)) + return resObj + }, + }, + // start registers the animation with the application run-loop and starts its execution. + // + // Args: + // * recv - Go(*fyne.Animation) + "Go(*fyne.Animation)//start": { + Doc: "(*fyne.Animation).Start", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Animation + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Animation); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//start: arg 1: " + "expected native of type *fyne.Animation, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//start: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//start: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Start() + return arg0 + }, + }, + // stop will end this animation and remove it from the run-loop. + // + // Args: + // * recv - Go(*fyne.Animation) + "Go(*fyne.Animation)//stop": { + Doc: "(*fyne.Animation).Stop", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Animation + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Animation); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//stop: arg 1: " + "expected native of type *fyne.Animation, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//stop: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//stop: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Stop() + return arg0 + }, + }, + // Args: + // * tick - fn { decimal } + // Result: + // * fn { decimal } + "Go(*fyne.Animation)//tick!": { + Doc: "Set *fyne.Animation Tick value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Animation + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Animation); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//tick!: arg 1: " + "expected native of type *fyne.Animation, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//tick!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//tick!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(float32) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//tick!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 float32) { + var farg0Val env.Object + farg0Val = *env.NewDecimal(float64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//tick!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//tick!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.Tick = newVal + return arg0 + }, + }, + // Result: + // * fn { decimal } + "Go(*fyne.Animation)//tick?": { + Doc: "Get *fyne.Animation Tick value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Animation + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Animation); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//tick?: arg 1: " + "expected native of type *fyne.Animation, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//tick?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//tick?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float32 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Animation)//tick?: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + self.Tick(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * build - integer + // Result: + // * integer + "Go(*fyne.AppMetadata)//build!": { + Doc: "Set *fyne.AppMetadata Build value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.AppMetadata + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//build!: arg 1: " + "expected native of type *fyne.AppMetadata, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//build!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//build!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal int + if vc, ok := arg1.(env.Integer); ok { + newVal = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//build!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Build = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*fyne.AppMetadata)//build?": { + Doc: "Get *fyne.AppMetadata Build value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.AppMetadata + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//build?: arg 1: " + "expected native of type *fyne.AppMetadata, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//build?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//build?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(self.Build)) + return resObj + }, + }, + // Args: + // * custom - dict[string, string] + // Result: + // * dict[string, string] + "Go(*fyne.AppMetadata)//custom!": { + Doc: "Set *fyne.AppMetadata Custom value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.AppMetadata + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//custom!: arg 1: " + "expected native of type *fyne.AppMetadata, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//custom!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//custom!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal map[string]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//custom!: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + newVal = make(map[string]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//custom!: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV string + if vc, ok := v.Series.S[i+1].(env.String); ok { + mapV = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//custom!: arg 2: " + "map value: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+1])) + } + newVal[mapK] = mapV + } + case env.Dict: + newVal = make(map[string]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV string + if vc, ok := dictV.(env.String); ok { + mapV = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//custom!: arg 2: " + "map value: " + "expected string, but got " + objectDebugString(ps.Idx, dictV)) + } + newVal[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//custom!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//custom!: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Custom = newVal + return arg0 + }, + }, + // Result: + // * dict[string, string] + "Go(*fyne.AppMetadata)//custom?": { + Doc: "Get *fyne.AppMetadata Custom value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.AppMetadata + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//custom?: arg 1: " + "expected native of type *fyne.AppMetadata, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//custom?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//custom?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + data := make(map[string]any, len(self.Custom)) + for mKey, mVal := range self.Custom { + var dVal env.Object + dVal = *env.NewString(mVal) + data[mKey] = dVal + } + resObj = *env.NewDict(data) + } + return resObj + }, + }, + // Args: + // * icon - Go(fyne.Resource) + // Result: + // * Go(fyne.Resource) + "Go(*fyne.AppMetadata)//icon!": { + Doc: "Set *fyne.AppMetadata Icon value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.AppMetadata + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//icon!: arg 1: " + "expected native of type *fyne.AppMetadata, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//icon!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//icon!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//icon!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//icon!: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//icon!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//icon!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Icon = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Resource) + "Go(*fyne.AppMetadata)//icon?": { + Doc: "Get *fyne.AppMetadata Icon value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.AppMetadata + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//icon?: arg 1: " + "expected native of type *fyne.AppMetadata, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//icon?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//icon?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Icon, "Go(fyne.Resource)") + return resObj + }, + }, + // Args: + // * id - string + // Result: + // * string + "Go(*fyne.AppMetadata)//id!": { + Doc: "Set *fyne.AppMetadata ID value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.AppMetadata + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//id!: arg 1: " + "expected native of type *fyne.AppMetadata, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//id!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//id!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//id!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.ID = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*fyne.AppMetadata)//id?": { + Doc: "Get *fyne.AppMetadata ID value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.AppMetadata + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//id?: arg 1: " + "expected native of type *fyne.AppMetadata, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//id?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//id?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.ID) + return resObj + }, + }, + // Args: + // * name - string + // Result: + // * string + "Go(*fyne.AppMetadata)//name!": { + Doc: "Set *fyne.AppMetadata Name value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.AppMetadata + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//name!: arg 1: " + "expected native of type *fyne.AppMetadata, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//name!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//name!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//name!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Name = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*fyne.AppMetadata)//name?": { + Doc: "Get *fyne.AppMetadata Name value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.AppMetadata + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//name?: arg 1: " + "expected native of type *fyne.AppMetadata, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//name?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//name?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Name) + return resObj + }, + }, + // Args: + // * release - bool + // Result: + // * bool + "Go(*fyne.AppMetadata)//release!": { + Doc: "Set *fyne.AppMetadata Release value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.AppMetadata + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//release!: arg 1: " + "expected native of type *fyne.AppMetadata, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//release!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//release!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//release!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Release = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*fyne.AppMetadata)//release?": { + Doc: "Get *fyne.AppMetadata Release value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.AppMetadata + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//release?: arg 1: " + "expected native of type *fyne.AppMetadata, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//release?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//release?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Release)) + return resObj + }, + }, + // Args: + // * version - string + // Result: + // * string + "Go(*fyne.AppMetadata)//version!": { + Doc: "Set *fyne.AppMetadata Version value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.AppMetadata + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//version!: arg 1: " + "expected native of type *fyne.AppMetadata, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//version!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//version!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//version!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Version = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*fyne.AppMetadata)//version?": { + Doc: "Get *fyne.AppMetadata Version value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.AppMetadata + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//version?: arg 1: " + "expected native of type *fyne.AppMetadata, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//version?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.AppMetadata)//version?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Version) + return resObj + }, + }, + // add appends the specified object to the items this container manages. + // + // Since: 1.4 + // + // Args: + // * recv - Go(*fyne.Container) + // * add - Go(fyne.CanvasObject) + "Go(*fyne.Container)//add": { + Doc: "(*fyne.Container).Add", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//add: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//add: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//add: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//add: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//add: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//add: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//add: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Add(arg1Val) + return arg0 + }, + }, + // add-object adds another [CanvasObject] to the set this Container holds. + // + // Deprecated: Use [Container.Add] instead. + // + // Args: + // * recv - Go(*fyne.Container) + // * o - Go(fyne.CanvasObject) + "Go(*fyne.Container)//add-object": { + Doc: "(*fyne.Container).AddObject", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//add-object: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//add-object: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//add-object: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//add-object: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//add-object: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//add-object: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//add-object: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddObject(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*fyne.Container)//hidden!": { + Doc: "Set *fyne.Container Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//hidden!: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*fyne.Container)//hidden?": { + Doc: "Get *fyne.Container Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//hidden?: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // hide sets this container, and all its children, to be not visible. + // + // Args: + // * recv - Go(*fyne.Container) + "Go(*fyne.Container)//hide": { + Doc: "(*fyne.Container).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//hide: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * layout - Go(fyne.Layout) + // Result: + // * Go(fyne.Layout) + "Go(*fyne.Container)//layout!": { + Doc: "Set *fyne.Container Layout value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//layout!: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//layout!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//layout!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Layout + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Layout(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//layout!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Layout); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//layout!: arg 2: " + "expected native of type fyne.Layout, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//layout!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//layout!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Layout = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Layout) + "Go(*fyne.Container)//layout?": { + Doc: "Get *fyne.Container Layout value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//layout?: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//layout?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//layout?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Layout, "Go(fyne.Layout)") + return resObj + }, + }, + // min-size calculates the minimum size of c. + // This is delegated to the [Container.Layout], if specified, otherwise it will be calculated. + // + // Args: + // * recv - Go(*fyne.Container) + // Result: + // * Go(fyne.Size) + "Go(*fyne.Container)//min-size": { + Doc: "(*fyne.Container).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//min-size: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // move the container (and all its children) to a new position, relative to its parent. + // + // Args: + // * recv - Go(*fyne.Container) + // * pos - Go(fyne.Position) + "Go(*fyne.Container)//move": { + Doc: "(*fyne.Container).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//move: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * block[Go(fyne.CanvasObject)] + "Go(*fyne.Container)//objects!": { + Doc: "Set *fyne.Container Objects value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//objects!: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//objects!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//objects!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []fyne.CanvasObject + switch v := arg1.(type) { + case env.Block: + newVal = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//objects!: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//objects!: arg 2: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//objects!: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//objects!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//objects!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//objects!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Objects = newVal + return arg0 + }, + }, + // Result: + // * block[Go(fyne.CanvasObject)] + "Go(*fyne.Container)//objects?": { + Doc: "Get *fyne.Container Objects value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//objects?: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//objects?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//objects?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Objects)) + for i, it := range self.Objects { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.CanvasObject)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // position gets the current position of c relative to its parent. + // + // Args: + // * recv - Go(*fyne.Container) + // Result: + // * Go(fyne.position) + "Go(*fyne.Container)//position": { + Doc: "(*fyne.Container).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//position: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // refresh causes this object to be redrawn in it's current state + // + // Args: + // * recv - Go(*fyne.Container) + "Go(*fyne.Container)//refresh": { + Doc: "(*fyne.Container).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//refresh: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // remove updates the contents of this container to no longer include the specified object. + // This method is not intended to be used inside a loop, to remove all the elements. + // It is much more efficient to call [Container.removeAll) instead. + // + // Args: + // * recv - Go(*fyne.Container) + // * rem - Go(fyne.CanvasObject) + "Go(*fyne.Container)//remove": { + Doc: "(*fyne.Container).Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//remove: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//remove: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//remove: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//remove: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//remove: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Remove(arg1Val) + return arg0 + }, + }, + // remove-all updates the contents of this container to no longer include any objects. + // + // Since: 2.2 + // + // Args: + // * recv - Go(*fyne.Container) + "Go(*fyne.Container)//remove-all": { + Doc: "(*fyne.Container).RemoveAll", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//remove-all: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//remove-all: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//remove-all: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveAll() + return arg0 + }, + }, + // resize sets a new size for c. + // + // Args: + // * recv - Go(*fyne.Container) + // * size - Go(fyne.Size) + "Go(*fyne.Container)//resize": { + Doc: "(*fyne.Container).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//resize: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // show sets this container, and all its children, to be visible. + // + // Args: + // * recv - Go(*fyne.Container) + "Go(*fyne.Container)//show": { + Doc: "(*fyne.Container).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//show: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // size returns the current size c. + // + // Args: + // * recv - Go(*fyne.Container) + // Result: + // * Go(fyne.size) + "Go(*fyne.Container)//size": { + Doc: "(*fyne.Container).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//size: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // visible returns true if the container is currently visible, false otherwise. + // + // Args: + // * recv - Go(*fyne.Container) + // Result: + // * bool + "Go(*fyne.Container)//visible": { + Doc: "(*fyne.Container).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Container + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Container); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//visible: arg 1: " + "expected native of type *fyne.Container, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Container)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // components returns the X and Y elements of v. + // + // Args: + // * recv - Go(fyne.Delta) + // Result: + // [ + // decimal + // decimal + // ] + "Go(*fyne.Delta)//components": { + Doc: "fyne.Delta.Components", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Delta + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Delta); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//components: arg 1: " + "expected native of type *fyne.Delta, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//components: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1 := arg0Val.Components() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + var res1Obj env.Object + res1Obj = *env.NewDecimal(float64(res1)) + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * dx - decimal + // Result: + // * decimal + "Go(*fyne.Delta)//dx!": { + Doc: "Set *fyne.Delta DX value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Delta + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Delta); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//dx!: arg 1: " + "expected native of type *fyne.Delta, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//dx!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//dx!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//dx!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.DX = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*fyne.Delta)//dx?": { + Doc: "Get *fyne.Delta DX value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Delta + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Delta); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//dx?: arg 1: " + "expected native of type *fyne.Delta, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//dx?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//dx?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.DX)) + return resObj + }, + }, + // Args: + // * dy - decimal + // Result: + // * decimal + "Go(*fyne.Delta)//dy!": { + Doc: "Set *fyne.Delta DY value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Delta + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Delta); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//dy!: arg 1: " + "expected native of type *fyne.Delta, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//dy!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//dy!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//dy!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.DY = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*fyne.Delta)//dy?": { + Doc: "Get *fyne.Delta DY value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Delta + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Delta); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//dy?: arg 1: " + "expected native of type *fyne.Delta, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//dy?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//dy?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.DY)) + return resObj + }, + }, + // is-zero returns whether the Position is at the zero-point. + // + // Args: + // * recv - Go(fyne.Delta) + // Result: + // * bool + "Go(*fyne.Delta)//is-zero": { + Doc: "fyne.Delta.IsZero", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Delta + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Delta); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//is-zero: arg 1: " + "expected native of type *fyne.Delta, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Delta)//is-zero: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.IsZero() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * absolute-position - Go(fyne.Position) + // Result: + // * Go(fyne.Position) + "Go(*fyne.DragEvent)//absolute-position!": { + Doc: "Set *fyne.DragEvent AbsolutePosition value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.DragEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.DragEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//absolute-position!: arg 1: " + "expected native of type *fyne.DragEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//absolute-position!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//absolute-position!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//absolute-position!: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//absolute-position!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//absolute-position!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.AbsolutePosition = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Position) + "Go(*fyne.DragEvent)//absolute-position?": { + Doc: "Get *fyne.DragEvent AbsolutePosition value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.DragEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.DragEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//absolute-position?: arg 1: " + "expected native of type *fyne.DragEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//absolute-position?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//absolute-position?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.AbsolutePosition, "Go(*fyne.Position)") + return resObj + }, + }, + // Args: + // * dragged - Go(fyne.Delta) + // Result: + // * Go(fyne.Delta) + "Go(*fyne.DragEvent)//dragged!": { + Doc: "Set *fyne.DragEvent Dragged value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.DragEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.DragEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//dragged!: arg 1: " + "expected native of type *fyne.DragEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//dragged!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//dragged!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Delta + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Delta); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//dragged!: arg 2: " + "expected native of type *fyne.Delta, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//dragged!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//dragged!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Dragged = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Delta) + "Go(*fyne.DragEvent)//dragged?": { + Doc: "Get *fyne.DragEvent Dragged value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.DragEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.DragEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//dragged?: arg 1: " + "expected native of type *fyne.DragEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//dragged?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//dragged?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.Dragged, "Go(*fyne.Delta)") + return resObj + }, + }, + // Args: + // * point-event - Go(fyne.PointEvent) + // Result: + // * Go(fyne.PointEvent) + "Go(*fyne.DragEvent)//point-event!": { + Doc: "Set *fyne.DragEvent PointEvent value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.DragEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.DragEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//point-event!: arg 1: " + "expected native of type *fyne.DragEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//point-event!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//point-event!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//point-event!: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//point-event!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//point-event!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.PointEvent = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.PointEvent) + "Go(*fyne.DragEvent)//point-event?": { + Doc: "Get *fyne.DragEvent PointEvent value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.DragEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.DragEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//point-event?: arg 1: " + "expected native of type *fyne.DragEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//point-event?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//point-event?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.PointEvent, "Go(*fyne.PointEvent)") + return resObj + }, + }, + // Args: + // * position - Go(fyne.Position) + // Result: + // * Go(fyne.Position) + "Go(*fyne.DragEvent)//position!": { + Doc: "Set *fyne.DragEvent Position value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.DragEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.DragEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//position!: arg 1: " + "expected native of type *fyne.DragEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//position!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//position!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//position!: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//position!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//position!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Position = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Position) + "Go(*fyne.DragEvent)//position?": { + Doc: "Get *fyne.DragEvent Position value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.DragEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.DragEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//position?: arg 1: " + "expected native of type *fyne.DragEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//position?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.DragEvent)//position?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.Position, "Go(*fyne.Position)") + return resObj + }, + }, + // Args: + // * scan-code - integer + // Result: + // * integer + "Go(*fyne.HardwareKey)//scan-code!": { + Doc: "Set *fyne.HardwareKey ScanCode value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.HardwareKey + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.HardwareKey); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.HardwareKey)//scan-code!: arg 1: " + "expected native of type *fyne.HardwareKey, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.HardwareKey)//scan-code!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.HardwareKey)//scan-code!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal int + if vc, ok := arg1.(env.Integer); ok { + newVal = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.HardwareKey)//scan-code!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.ScanCode = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*fyne.HardwareKey)//scan-code?": { + Doc: "Get *fyne.HardwareKey ScanCode value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.HardwareKey + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.HardwareKey); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.HardwareKey)//scan-code?: arg 1: " + "expected native of type *fyne.HardwareKey, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.HardwareKey)//scan-code?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.HardwareKey)//scan-code?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(self.ScanCode)) + return resObj + }, + }, + // Args: + // * name - string + // Result: + // * string + "Go(*fyne.KeyEvent)//name!": { + Doc: "Set *fyne.KeyEvent Name value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.KeyEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//name!: arg 1: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//name!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//name!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.KeyName + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.KeyName + if natOk { + natVal, natValOk = nat.Value.(fyne.KeyName) + } + if natValOk { + newVal = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//name!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.KeyName(u) + } + } + self.Name = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*fyne.KeyEvent)//name?": { + Doc: "Get *fyne.KeyEvent Name value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.KeyEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//name?: arg 1: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//name?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//name?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(string(self.Name)) + return resObj + }, + }, + // Args: + // * physical - Go(fyne.HardwareKey) + // Result: + // * Go(fyne.HardwareKey) + "Go(*fyne.KeyEvent)//physical!": { + Doc: "Set *fyne.KeyEvent Physical value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.KeyEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//physical!: arg 1: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//physical!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//physical!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.HardwareKey + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.HardwareKey); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//physical!: arg 2: " + "expected native of type *fyne.HardwareKey, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//physical!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//physical!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Physical = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.HardwareKey) + "Go(*fyne.KeyEvent)//physical?": { + Doc: "Get *fyne.KeyEvent Physical value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.KeyEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//physical?: arg 1: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//physical?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.KeyEvent)//physical?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.Physical, "Go(*fyne.HardwareKey)") + return resObj + }, + }, + // Args: + // * items - block[Go(*fyne.Menu)] + // Result: + // * block[Go(*fyne.Menu)] + "Go(*fyne.MainMenu)//items!": { + Doc: "Set *fyne.MainMenu Items value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MainMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MainMenu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MainMenu)//items!: arg 1: " + "expected native of type *fyne.MainMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MainMenu)//items!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MainMenu)//items!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []*fyne.Menu + switch v := arg1.(type) { + case env.Block: + newVal = make([]*fyne.Menu, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Menu); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MainMenu)//items!: arg 2: " + "block item: " + "expected native of type *fyne.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MainMenu)//items!: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MainMenu)//items!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MainMenu)//items!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MainMenu)//items!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Items = newVal + return arg0 + }, + }, + // Result: + // * block[Go(*fyne.Menu)] + "Go(*fyne.MainMenu)//items?": { + Doc: "Get *fyne.MainMenu Items value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MainMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MainMenu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MainMenu)//items?: arg 1: " + "expected native of type *fyne.MainMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MainMenu)//items?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MainMenu)//items?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Items)) + for i, it := range self.Items { + items[i] = *env.NewNative(ps.Idx, it, "Go(*fyne.Menu)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // refresh will instruct any rendered menus using this struct to update their display. + // + // Since: 2.2 + // + // Args: + // * recv - Go(*fyne.MainMenu) + "Go(*fyne.MainMenu)//refresh": { + Doc: "(*fyne.MainMenu).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.MainMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MainMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MainMenu)//refresh: arg 1: " + "expected native of type *fyne.MainMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MainMenu)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MainMenu)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * items - block[Go(*fyne.MenuItem)] + // Result: + // * block[Go(*fyne.MenuItem)] + "Go(*fyne.Menu)//items!": { + Doc: "Set *fyne.Menu Items value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Menu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//items!: arg 1: " + "expected native of type *fyne.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//items!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//items!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []*fyne.MenuItem + switch v := arg1.(type) { + case env.Block: + newVal = make([]*fyne.MenuItem, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//items!: arg 2: " + "block item: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//items!: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//items!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//items!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//items!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Items = newVal + return arg0 + }, + }, + // Result: + // * block[Go(*fyne.MenuItem)] + "Go(*fyne.Menu)//items?": { + Doc: "Get *fyne.Menu Items value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Menu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//items?: arg 1: " + "expected native of type *fyne.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//items?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//items?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Items)) + for i, it := range self.Items { + items[i] = *env.NewNative(ps.Idx, it, "Go(*fyne.MenuItem)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // Args: + // * label - string + // Result: + // * string + "Go(*fyne.Menu)//label!": { + Doc: "Set *fyne.Menu Label value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Menu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//label!: arg 1: " + "expected native of type *fyne.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//label!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//label!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//label!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Label = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*fyne.Menu)//label?": { + Doc: "Get *fyne.Menu Label value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Menu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//label?: arg 1: " + "expected native of type *fyne.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//label?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//label?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Label) + return resObj + }, + }, + // refresh will instruct this menu to update its display. + // + // Since: 2.2 + // + // Args: + // * recv - Go(*fyne.Menu) + "Go(*fyne.Menu)//refresh": { + Doc: "(*fyne.Menu).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//refresh: arg 1: " + "expected native of type *fyne.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Menu)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * action - fn { } + // Result: + // * fn { } + "Go(*fyne.MenuItem)//action!": { + Doc: "Set *fyne.MenuItem Action value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//action!: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//action!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//action!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//action!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//action!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//action!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.Action = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*fyne.MenuItem)//action?": { + Doc: "Get *fyne.MenuItem Action value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//action?: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//action?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//action?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.Action() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * checked - bool + // Result: + // * bool + "Go(*fyne.MenuItem)//checked!": { + Doc: "Set *fyne.MenuItem Checked value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//checked!: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//checked!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//checked!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//checked!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Checked = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*fyne.MenuItem)//checked?": { + Doc: "Get *fyne.MenuItem Checked value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//checked?: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//checked?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//checked?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Checked)) + return resObj + }, + }, + // Args: + // * child-menu - Go(*fyne.Menu) + // Result: + // * Go(*fyne.Menu) + "Go(*fyne.MenuItem)//child-menu!": { + Doc: "Set *fyne.MenuItem ChildMenu value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//child-menu!: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//child-menu!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//child-menu!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Menu + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Menu); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//child-menu!: arg 2: " + "expected native of type *fyne.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//child-menu!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//child-menu!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.ChildMenu = newVal + return arg0 + }, + }, + // Result: + // * Go(*fyne.Menu) + "Go(*fyne.MenuItem)//child-menu?": { + Doc: "Get *fyne.MenuItem ChildMenu value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//child-menu?: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//child-menu?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//child-menu?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.ChildMenu, "Go(*fyne.Menu)") + return resObj + }, + }, + // Args: + // * disabled - bool + // Result: + // * bool + "Go(*fyne.MenuItem)//disabled!": { + Doc: "Set *fyne.MenuItem Disabled value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//disabled!: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//disabled!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//disabled!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//disabled!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Disabled = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*fyne.MenuItem)//disabled?": { + Doc: "Get *fyne.MenuItem Disabled value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//disabled?: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//disabled?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//disabled?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Disabled)) + return resObj + }, + }, + // Args: + // * icon - Go(fyne.Resource) + // Result: + // * Go(fyne.Resource) + "Go(*fyne.MenuItem)//icon!": { + Doc: "Set *fyne.MenuItem Icon value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//icon!: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//icon!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//icon!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//icon!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//icon!: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//icon!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//icon!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Icon = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Resource) + "Go(*fyne.MenuItem)//icon?": { + Doc: "Get *fyne.MenuItem Icon value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//icon?: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//icon?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//icon?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Icon, "Go(fyne.Resource)") + return resObj + }, + }, + // Args: + // * is-quit - bool + // Result: + // * bool + "Go(*fyne.MenuItem)//is-quit!": { + Doc: "Set *fyne.MenuItem IsQuit value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//is-quit!: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//is-quit!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//is-quit!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//is-quit!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.IsQuit = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*fyne.MenuItem)//is-quit?": { + Doc: "Get *fyne.MenuItem IsQuit value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//is-quit?: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//is-quit?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//is-quit?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.IsQuit)) + return resObj + }, + }, + // Args: + // * is-separator - bool + // Result: + // * bool + "Go(*fyne.MenuItem)//is-separator!": { + Doc: "Set *fyne.MenuItem IsSeparator value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//is-separator!: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//is-separator!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//is-separator!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//is-separator!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.IsSeparator = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*fyne.MenuItem)//is-separator?": { + Doc: "Get *fyne.MenuItem IsSeparator value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//is-separator?: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//is-separator?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//is-separator?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.IsSeparator)) + return resObj + }, + }, + // Args: + // * label - string + // Result: + // * string + "Go(*fyne.MenuItem)//label!": { + Doc: "Set *fyne.MenuItem Label value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//label!: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//label!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//label!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//label!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Label = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*fyne.MenuItem)//label?": { + Doc: "Get *fyne.MenuItem Label value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//label?: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//label?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//label?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Label) + return resObj + }, + }, + // Args: + // * shortcut - Go(fyne.Shortcut) + // Result: + // * Go(fyne.Shortcut) + "Go(*fyne.MenuItem)//shortcut!": { + Doc: "Set *fyne.MenuItem Shortcut value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//shortcut!: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//shortcut!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//shortcut!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Shortcut + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Shortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//shortcut!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Shortcut); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//shortcut!: arg 2: " + "expected native of type fyne.Shortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//shortcut!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//shortcut!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Shortcut = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Shortcut) + "Go(*fyne.MenuItem)//shortcut?": { + Doc: "Get *fyne.MenuItem Shortcut value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.MenuItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//shortcut?: arg 1: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//shortcut?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.MenuItem)//shortcut?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Shortcut, "Go(fyne.Shortcut)") + return resObj + }, + }, + // Args: + // * content - string + // Result: + // * string + "Go(*fyne.Notification)//content!": { + Doc: "Set *fyne.Notification Content value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Notification + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Notification); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Notification)//content!: arg 1: " + "expected native of type *fyne.Notification, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Notification)//content!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Notification)//content!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Notification)//content!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Content = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*fyne.Notification)//content?": { + Doc: "Get *fyne.Notification Content value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Notification + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Notification); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Notification)//content?: arg 1: " + "expected native of type *fyne.Notification, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Notification)//content?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Notification)//content?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Content) + return resObj + }, + }, + // Args: + // * title - string + // Result: + // * string + "Go(*fyne.Notification)//title!": { + Doc: "Set *fyne.Notification Title value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Notification + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Notification); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Notification)//title!: arg 1: " + "expected native of type *fyne.Notification, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Notification)//title!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Notification)//title!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Notification)//title!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Title = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*fyne.Notification)//title?": { + Doc: "Get *fyne.Notification Title value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Notification + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Notification); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Notification)//title?: arg 1: " + "expected native of type *fyne.Notification, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Notification)//title?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Notification)//title?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Title) + return resObj + }, + }, + // Args: + // * absolute-position - Go(fyne.Position) + // Result: + // * Go(fyne.Position) + "Go(*fyne.PointEvent)//absolute-position!": { + Doc: "Set *fyne.PointEvent AbsolutePosition value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.PointEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//absolute-position!: arg 1: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//absolute-position!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//absolute-position!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//absolute-position!: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//absolute-position!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//absolute-position!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.AbsolutePosition = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Position) + "Go(*fyne.PointEvent)//absolute-position?": { + Doc: "Get *fyne.PointEvent AbsolutePosition value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.PointEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//absolute-position?: arg 1: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//absolute-position?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//absolute-position?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.AbsolutePosition, "Go(*fyne.Position)") + return resObj + }, + }, + // Args: + // * position - Go(fyne.Position) + // Result: + // * Go(fyne.Position) + "Go(*fyne.PointEvent)//position!": { + Doc: "Set *fyne.PointEvent Position value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.PointEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//position!: arg 1: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//position!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//position!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//position!: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//position!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//position!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Position = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Position) + "Go(*fyne.PointEvent)//position?": { + Doc: "Get *fyne.PointEvent Position value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.PointEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//position?: arg 1: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//position?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.PointEvent)//position?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.Position, "Go(*fyne.Position)") + return resObj + }, + }, + // add returns a new [Position] that is the result of offsetting the current + // position by p2 X and Y. + // + // Args: + // * recv - Go(fyne.Position) + // * v - Go(fyne.Vector2) + // Result: + // * Go(fyne.Position) + "Go(*fyne.Position)//add": { + Doc: "fyne.Position.Add", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Position + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//add: arg 1: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//add: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Vector2 + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Vector2(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//add: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Vector2); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//add: arg 2: " + "expected native of type fyne.Vector2, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//add: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//add: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Add(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // add-xy returns a new [Position] by adding x and y to the current one. + // + // Args: + // * recv - Go(fyne.Position) + // * x - decimal + // * y - decimal + // Result: + // * Go(fyne.Position) + "Go(*fyne.Position)//add-xy": { + Doc: "fyne.Position.AddXY", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Position + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//add-xy: arg 1: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//add-xy: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float32 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//add-xy: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val float32 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//add-xy: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + res0 := arg0Val.AddXY(arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // components returns the X and Y elements of p. + // + // Args: + // * recv - Go(fyne.Position) + // Result: + // [ + // decimal + // decimal + // ] + "Go(*fyne.Position)//components": { + Doc: "fyne.Position.Components", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Position + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//components: arg 1: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//components: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1 := arg0Val.Components() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + var res1Obj env.Object + res1Obj = *env.NewDecimal(float64(res1)) + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // is-zero returns whether the Position is at the zero-point. + // + // Args: + // * recv - Go(fyne.Position) + // Result: + // * bool + "Go(*fyne.Position)//is-zero": { + Doc: "fyne.Position.IsZero", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Position + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//is-zero: arg 1: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//is-zero: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.IsZero() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // subtract returns a new [Position] that is the result of offsetting the current + // position by p2 -X and -Y. + // + // Args: + // * recv - Go(fyne.Position) + // * v - Go(fyne.Vector2) + // Result: + // * Go(fyne.Position) + "Go(*fyne.Position)//subtract": { + Doc: "fyne.Position.Subtract", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Position + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//subtract: arg 1: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//subtract: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Vector2 + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Vector2(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//subtract: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Vector2); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//subtract: arg 2: " + "expected native of type fyne.Vector2, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//subtract: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//subtract: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Subtract(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // subtract-xy returns a new [Position] by subtracting x and y from the current one. + // + // Args: + // * recv - Go(fyne.Position) + // * x - decimal + // * y - decimal + // Result: + // * Go(fyne.Position) + "Go(*fyne.Position)//subtract-xy": { + Doc: "fyne.Position.SubtractXY", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Position + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//subtract-xy: arg 1: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//subtract-xy: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float32 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//subtract-xy: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val float32 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//subtract-xy: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + res0 := arg0Val.SubtractXY(arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * x - decimal + // Result: + // * decimal + "Go(*fyne.Position)//x!": { + Doc: "Set *fyne.Position X value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Position + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//x!: arg 1: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//x!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//x!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//x!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.X = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*fyne.Position)//x?": { + Doc: "Get *fyne.Position X value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Position + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//x?: arg 1: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//x?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//x?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.X)) + return resObj + }, + }, + // Args: + // * y - decimal + // Result: + // * decimal + "Go(*fyne.Position)//y!": { + Doc: "Set *fyne.Position Y value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Position + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//y!: arg 1: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//y!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//y!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//y!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Y = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*fyne.Position)//y?": { + Doc: "Get *fyne.Position Y value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Position + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//y?: arg 1: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//y?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Position)//y?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.Y)) + return resObj + }, + }, + // Args: + // * absolute-position - Go(fyne.Position) + // Result: + // * Go(fyne.Position) + "Go(*fyne.ScrollEvent)//absolute-position!": { + Doc: "Set *fyne.ScrollEvent AbsolutePosition value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.ScrollEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ScrollEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//absolute-position!: arg 1: " + "expected native of type *fyne.ScrollEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//absolute-position!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//absolute-position!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//absolute-position!: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//absolute-position!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//absolute-position!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.AbsolutePosition = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Position) + "Go(*fyne.ScrollEvent)//absolute-position?": { + Doc: "Get *fyne.ScrollEvent AbsolutePosition value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.ScrollEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ScrollEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//absolute-position?: arg 1: " + "expected native of type *fyne.ScrollEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//absolute-position?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//absolute-position?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.AbsolutePosition, "Go(*fyne.Position)") + return resObj + }, + }, + // Args: + // * point-event - Go(fyne.PointEvent) + // Result: + // * Go(fyne.PointEvent) + "Go(*fyne.ScrollEvent)//point-event!": { + Doc: "Set *fyne.ScrollEvent PointEvent value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.ScrollEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ScrollEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//point-event!: arg 1: " + "expected native of type *fyne.ScrollEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//point-event!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//point-event!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//point-event!: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//point-event!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//point-event!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.PointEvent = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.PointEvent) + "Go(*fyne.ScrollEvent)//point-event?": { + Doc: "Get *fyne.ScrollEvent PointEvent value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.ScrollEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ScrollEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//point-event?: arg 1: " + "expected native of type *fyne.ScrollEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//point-event?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//point-event?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.PointEvent, "Go(*fyne.PointEvent)") + return resObj + }, + }, + // Args: + // * position - Go(fyne.Position) + // Result: + // * Go(fyne.Position) + "Go(*fyne.ScrollEvent)//position!": { + Doc: "Set *fyne.ScrollEvent Position value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.ScrollEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ScrollEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//position!: arg 1: " + "expected native of type *fyne.ScrollEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//position!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//position!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//position!: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//position!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//position!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Position = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Position) + "Go(*fyne.ScrollEvent)//position?": { + Doc: "Get *fyne.ScrollEvent Position value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.ScrollEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ScrollEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//position?: arg 1: " + "expected native of type *fyne.ScrollEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//position?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//position?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.Position, "Go(*fyne.Position)") + return resObj + }, + }, + // Args: + // * scrolled - Go(fyne.Delta) + // Result: + // * Go(fyne.Delta) + "Go(*fyne.ScrollEvent)//scrolled!": { + Doc: "Set *fyne.ScrollEvent Scrolled value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.ScrollEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ScrollEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//scrolled!: arg 1: " + "expected native of type *fyne.ScrollEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//scrolled!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//scrolled!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Delta + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Delta); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//scrolled!: arg 2: " + "expected native of type *fyne.Delta, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//scrolled!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//scrolled!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Scrolled = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Delta) + "Go(*fyne.ScrollEvent)//scrolled?": { + Doc: "Get *fyne.ScrollEvent Scrolled value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.ScrollEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ScrollEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//scrolled?: arg 1: " + "expected native of type *fyne.ScrollEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//scrolled?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ScrollEvent)//scrolled?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.Scrolled, "Go(*fyne.Delta)") + return resObj + }, + }, + // Args: + // * clipboard - Go(fyne.Clipboard) + // Result: + // * Go(fyne.Clipboard) + "Go(*fyne.ShortcutCopy)//clipboard!": { + Doc: "Set *fyne.ShortcutCopy Clipboard value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.ShortcutCopy + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutCopy); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//clipboard!: arg 1: " + "expected native of type *fyne.ShortcutCopy, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//clipboard!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//clipboard!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Clipboard + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Clipboard(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//clipboard!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Clipboard); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//clipboard!: arg 2: " + "expected native of type fyne.Clipboard, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//clipboard!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//clipboard!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Clipboard = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Clipboard) + "Go(*fyne.ShortcutCopy)//clipboard?": { + Doc: "Get *fyne.ShortcutCopy Clipboard value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.ShortcutCopy + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutCopy); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//clipboard?: arg 1: " + "expected native of type *fyne.ShortcutCopy, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//clipboard?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//clipboard?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Clipboard, "Go(fyne.Clipboard)") + return resObj + }, + }, + // key returns the [keyName] for this shortcut. + // + // Implements: [keyboardShortcut] + // + // Args: + // * recv - Go(*fyne.ShortcutCopy) + // Result: + // * string + "Go(*fyne.ShortcutCopy)//key": { + Doc: "(*fyne.ShortcutCopy).Key", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutCopy + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutCopy); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//key: arg 1: " + "expected native of type *fyne.ShortcutCopy, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Key() + var res0Obj env.Object + res0Obj = *env.NewString(string(res0)) + return res0Obj + }, + }, + // mod returns the [Keymodifier] for this shortcut. + // + // Implements: [KeyboardShortcut] + // + // Args: + // * recv - Go(*fyne.ShortcutCopy) + // Result: + // * integer + "Go(*fyne.ShortcutCopy)//mod": { + Doc: "(*fyne.ShortcutCopy).Mod", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutCopy + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutCopy); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//mod: arg 1: " + "expected native of type *fyne.ShortcutCopy, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//mod: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//mod: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Mod() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(int(res0))) + return res0Obj + }, + }, + // shortcut-name returns the shortcut name + // + // Args: + // * recv - Go(*fyne.ShortcutCopy) + // Result: + // * string + "Go(*fyne.ShortcutCopy)//shortcut-name": { + Doc: "(*fyne.ShortcutCopy).ShortcutName", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutCopy + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutCopy); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//shortcut-name: arg 1: " + "expected native of type *fyne.ShortcutCopy, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//shortcut-name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCopy)//shortcut-name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ShortcutName() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * clipboard - Go(fyne.Clipboard) + // Result: + // * Go(fyne.Clipboard) + "Go(*fyne.ShortcutCut)//clipboard!": { + Doc: "Set *fyne.ShortcutCut Clipboard value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.ShortcutCut + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutCut); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//clipboard!: arg 1: " + "expected native of type *fyne.ShortcutCut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//clipboard!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//clipboard!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Clipboard + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Clipboard(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//clipboard!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Clipboard); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//clipboard!: arg 2: " + "expected native of type fyne.Clipboard, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//clipboard!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//clipboard!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Clipboard = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Clipboard) + "Go(*fyne.ShortcutCut)//clipboard?": { + Doc: "Get *fyne.ShortcutCut Clipboard value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.ShortcutCut + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutCut); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//clipboard?: arg 1: " + "expected native of type *fyne.ShortcutCut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//clipboard?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//clipboard?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Clipboard, "Go(fyne.Clipboard)") + return resObj + }, + }, + // key returns the [keyName] for this shortcut. + // + // Implements: [keyboardShortcut] + // + // Args: + // * recv - Go(*fyne.ShortcutCut) + // Result: + // * string + "Go(*fyne.ShortcutCut)//key": { + Doc: "(*fyne.ShortcutCut).Key", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutCut + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutCut); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//key: arg 1: " + "expected native of type *fyne.ShortcutCut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Key() + var res0Obj env.Object + res0Obj = *env.NewString(string(res0)) + return res0Obj + }, + }, + // mod returns the [Keymodifier] for this shortcut. + // + // Implements: [KeyboardShortcut] + // + // Args: + // * recv - Go(*fyne.ShortcutCut) + // Result: + // * integer + "Go(*fyne.ShortcutCut)//mod": { + Doc: "(*fyne.ShortcutCut).Mod", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutCut + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutCut); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//mod: arg 1: " + "expected native of type *fyne.ShortcutCut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//mod: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//mod: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Mod() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(int(res0))) + return res0Obj + }, + }, + // shortcut-name returns the shortcut name + // + // Args: + // * recv - Go(*fyne.ShortcutCut) + // Result: + // * string + "Go(*fyne.ShortcutCut)//shortcut-name": { + Doc: "(*fyne.ShortcutCut).ShortcutName", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutCut + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutCut); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//shortcut-name: arg 1: " + "expected native of type *fyne.ShortcutCut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//shortcut-name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutCut)//shortcut-name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ShortcutName() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // add-shortcut register a handler to be executed when the shortcut action is triggered + // + // Args: + // * recv - Go(*fyne.ShortcutHandler) + // * shortcut - Go(fyne.Shortcut) + // * handler - fn { Go(fyne.Shortcut) } + "Go(*fyne.ShortcutHandler)//add-shortcut": { + Doc: "(*fyne.ShortcutHandler).AddShortcut", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutHandler + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutHandler); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//add-shortcut: arg 1: " + "expected native of type *fyne.ShortcutHandler, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//add-shortcut: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//add-shortcut: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Shortcut + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Shortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//add-shortcut: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Shortcut); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//add-shortcut: arg 2: " + "expected native of type fyne.Shortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//add-shortcut: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//add-shortcut: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val func(fyne.Shortcut) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//add-shortcut: arg 3: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 fyne.Shortcut) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Shortcut)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//add-shortcut: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//add-shortcut: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.AddShortcut(arg1Val, arg2Val) + return arg0 + }, + }, + // remove-shortcut removes a registered shortcut + // + // Args: + // * recv - Go(*fyne.ShortcutHandler) + // * shortcut - Go(fyne.Shortcut) + "Go(*fyne.ShortcutHandler)//remove-shortcut": { + Doc: "(*fyne.ShortcutHandler).RemoveShortcut", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutHandler + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutHandler); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//remove-shortcut: arg 1: " + "expected native of type *fyne.ShortcutHandler, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//remove-shortcut: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//remove-shortcut: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Shortcut + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Shortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//remove-shortcut: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Shortcut); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//remove-shortcut: arg 2: " + "expected native of type fyne.Shortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//remove-shortcut: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//remove-shortcut: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveShortcut(arg1Val) + return arg0 + }, + }, + // typed-shortcut handle the registered shortcut + // + // Args: + // * recv - Go(*fyne.ShortcutHandler) + // * shortcut - Go(fyne.Shortcut) + "Go(*fyne.ShortcutHandler)//typed-shortcut": { + Doc: "(*fyne.ShortcutHandler).TypedShortcut", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutHandler + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutHandler); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//typed-shortcut: arg 1: " + "expected native of type *fyne.ShortcutHandler, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//typed-shortcut: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//typed-shortcut: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Shortcut + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Shortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//typed-shortcut: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Shortcut); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//typed-shortcut: arg 2: " + "expected native of type fyne.Shortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//typed-shortcut: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutHandler)//typed-shortcut: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedShortcut(arg1Val) + return arg0 + }, + }, + // Args: + // * clipboard - Go(fyne.Clipboard) + // Result: + // * Go(fyne.Clipboard) + "Go(*fyne.ShortcutPaste)//clipboard!": { + Doc: "Set *fyne.ShortcutPaste Clipboard value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.ShortcutPaste + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutPaste); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//clipboard!: arg 1: " + "expected native of type *fyne.ShortcutPaste, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//clipboard!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//clipboard!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Clipboard + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Clipboard(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//clipboard!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Clipboard); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//clipboard!: arg 2: " + "expected native of type fyne.Clipboard, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//clipboard!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//clipboard!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Clipboard = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Clipboard) + "Go(*fyne.ShortcutPaste)//clipboard?": { + Doc: "Get *fyne.ShortcutPaste Clipboard value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.ShortcutPaste + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutPaste); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//clipboard?: arg 1: " + "expected native of type *fyne.ShortcutPaste, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//clipboard?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//clipboard?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Clipboard, "Go(fyne.Clipboard)") + return resObj + }, + }, + // key returns the [keyName] for this shortcut. + // + // Implements: [keyboardShortcut] + // + // Args: + // * recv - Go(*fyne.ShortcutPaste) + // Result: + // * string + "Go(*fyne.ShortcutPaste)//key": { + Doc: "(*fyne.ShortcutPaste).Key", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutPaste + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutPaste); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//key: arg 1: " + "expected native of type *fyne.ShortcutPaste, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Key() + var res0Obj env.Object + res0Obj = *env.NewString(string(res0)) + return res0Obj + }, + }, + // mod returns the [Keymodifier] for this shortcut. + // + // Implements: [KeyboardShortcut] + // + // Args: + // * recv - Go(*fyne.ShortcutPaste) + // Result: + // * integer + "Go(*fyne.ShortcutPaste)//mod": { + Doc: "(*fyne.ShortcutPaste).Mod", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutPaste + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutPaste); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//mod: arg 1: " + "expected native of type *fyne.ShortcutPaste, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//mod: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//mod: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Mod() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(int(res0))) + return res0Obj + }, + }, + // shortcut-name returns the shortcut name + // + // Args: + // * recv - Go(*fyne.ShortcutPaste) + // Result: + // * string + "Go(*fyne.ShortcutPaste)//shortcut-name": { + Doc: "(*fyne.ShortcutPaste).ShortcutName", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutPaste + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutPaste); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//shortcut-name: arg 1: " + "expected native of type *fyne.ShortcutPaste, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//shortcut-name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutPaste)//shortcut-name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ShortcutName() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // key returns the [keyName] for this shortcut. + // + // Implements: [keyboardShortcut] + // + // Args: + // * recv - Go(*fyne.ShortcutRedo) + // Result: + // * string + "Go(*fyne.ShortcutRedo)//key": { + Doc: "(*fyne.ShortcutRedo).Key", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutRedo + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutRedo); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutRedo)//key: arg 1: " + "expected native of type *fyne.ShortcutRedo, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutRedo)//key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutRedo)//key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Key() + var res0Obj env.Object + res0Obj = *env.NewString(string(res0)) + return res0Obj + }, + }, + // mod returns the [Keymodifier] for this shortcut. + // + // Implements: [KeyboardShortcut] + // + // Args: + // * recv - Go(*fyne.ShortcutRedo) + // Result: + // * integer + "Go(*fyne.ShortcutRedo)//mod": { + Doc: "(*fyne.ShortcutRedo).Mod", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutRedo + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutRedo); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutRedo)//mod: arg 1: " + "expected native of type *fyne.ShortcutRedo, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutRedo)//mod: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutRedo)//mod: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Mod() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(int(res0))) + return res0Obj + }, + }, + // shortcut-name returns the shortcut name + // + // Args: + // * recv - Go(*fyne.ShortcutRedo) + // Result: + // * string + "Go(*fyne.ShortcutRedo)//shortcut-name": { + Doc: "(*fyne.ShortcutRedo).ShortcutName", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutRedo + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutRedo); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutRedo)//shortcut-name: arg 1: " + "expected native of type *fyne.ShortcutRedo, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutRedo)//shortcut-name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutRedo)//shortcut-name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ShortcutName() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // key returns the [keyName] for this shortcut. + // + // Implements: [keyboardShortcut] + // + // Args: + // * recv - Go(*fyne.ShortcutSelectAll) + // Result: + // * string + "Go(*fyne.ShortcutSelectAll)//key": { + Doc: "(*fyne.ShortcutSelectAll).Key", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutSelectAll + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutSelectAll); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutSelectAll)//key: arg 1: " + "expected native of type *fyne.ShortcutSelectAll, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutSelectAll)//key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutSelectAll)//key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Key() + var res0Obj env.Object + res0Obj = *env.NewString(string(res0)) + return res0Obj + }, + }, + // mod returns the [Keymodifier] for this shortcut. + // + // Implements: [KeyboardShortcut] + // + // Args: + // * recv - Go(*fyne.ShortcutSelectAll) + // Result: + // * integer + "Go(*fyne.ShortcutSelectAll)//mod": { + Doc: "(*fyne.ShortcutSelectAll).Mod", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutSelectAll + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutSelectAll); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutSelectAll)//mod: arg 1: " + "expected native of type *fyne.ShortcutSelectAll, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutSelectAll)//mod: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutSelectAll)//mod: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Mod() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(int(res0))) + return res0Obj + }, + }, + // shortcut-name returns the shortcut name + // + // Args: + // * recv - Go(*fyne.ShortcutSelectAll) + // Result: + // * string + "Go(*fyne.ShortcutSelectAll)//shortcut-name": { + Doc: "(*fyne.ShortcutSelectAll).ShortcutName", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutSelectAll + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutSelectAll); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutSelectAll)//shortcut-name: arg 1: " + "expected native of type *fyne.ShortcutSelectAll, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutSelectAll)//shortcut-name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutSelectAll)//shortcut-name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ShortcutName() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // key returns the [keyName] for this shortcut. + // + // Implements: [keyboardShortcut] + // + // Args: + // * recv - Go(*fyne.ShortcutUndo) + // Result: + // * string + "Go(*fyne.ShortcutUndo)//key": { + Doc: "(*fyne.ShortcutUndo).Key", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutUndo + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutUndo); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutUndo)//key: arg 1: " + "expected native of type *fyne.ShortcutUndo, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutUndo)//key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutUndo)//key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Key() + var res0Obj env.Object + res0Obj = *env.NewString(string(res0)) + return res0Obj + }, + }, + // mod returns the [Keymodifier] for this shortcut. + // + // Implements: [KeyboardShortcut] + // + // Args: + // * recv - Go(*fyne.ShortcutUndo) + // Result: + // * integer + "Go(*fyne.ShortcutUndo)//mod": { + Doc: "(*fyne.ShortcutUndo).Mod", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutUndo + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutUndo); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutUndo)//mod: arg 1: " + "expected native of type *fyne.ShortcutUndo, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutUndo)//mod: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutUndo)//mod: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Mod() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(int(res0))) + return res0Obj + }, + }, + // shortcut-name returns the shortcut name + // + // Args: + // * recv - Go(*fyne.ShortcutUndo) + // Result: + // * string + "Go(*fyne.ShortcutUndo)//shortcut-name": { + Doc: "(*fyne.ShortcutUndo).ShortcutName", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.ShortcutUndo + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ShortcutUndo); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutUndo)//shortcut-name: arg 1: " + "expected native of type *fyne.ShortcutUndo, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutUndo)//shortcut-name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.ShortcutUndo)//shortcut-name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ShortcutName() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // add returns a new Size that is the result of increasing the current size by + // s2 Width and Height. + // + // Args: + // * recv - Go(fyne.Size) + // * v - Go(fyne.Vector2) + // Result: + // * Go(fyne.Size) + "Go(*fyne.Size)//add": { + Doc: "fyne.Size.Add", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Size + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//add: arg 1: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//add: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Vector2 + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Vector2(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//add: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Vector2); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//add: arg 2: " + "expected native of type fyne.Vector2, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//add: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//add: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Add(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // add-width-height returns a new Size by adding width and height to the current one. + // + // Args: + // * recv - Go(fyne.Size) + // * width - decimal + // * height - decimal + // Result: + // * Go(fyne.Size) + "Go(*fyne.Size)//add-width-height": { + Doc: "fyne.Size.AddWidthHeight", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Size + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//add-width-height: arg 1: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//add-width-height: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float32 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//add-width-height: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val float32 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//add-width-height: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + res0 := arg0Val.AddWidthHeight(arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // components returns the Width and Height elements of this Size + // + // Args: + // * recv - Go(fyne.Size) + // Result: + // [ + // decimal + // decimal + // ] + "Go(*fyne.Size)//components": { + Doc: "fyne.Size.Components", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Size + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//components: arg 1: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//components: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1 := arg0Val.Components() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + var res1Obj env.Object + res1Obj = *env.NewDecimal(float64(res1)) + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * height - decimal + // Result: + // * decimal + "Go(*fyne.Size)//height!": { + Doc: "Set *fyne.Size Height value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Size + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//height!: arg 1: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//height!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//height!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//height!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Height = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*fyne.Size)//height?": { + Doc: "Get *fyne.Size Height value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Size + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//height?: arg 1: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//height?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//height?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.Height)) + return resObj + }, + }, + // is-zero returns whether the Size has zero width and zero height. + // + // Args: + // * recv - Go(fyne.Size) + // Result: + // * bool + "Go(*fyne.Size)//is-zero": { + Doc: "fyne.Size.IsZero", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Size + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//is-zero: arg 1: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//is-zero: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.IsZero() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // max returns a new [Size] that is the maximum of the current Size and s2. + // + // Args: + // * recv - Go(fyne.Size) + // * v - Go(fyne.Vector2) + // Result: + // * Go(fyne.Size) + "Go(*fyne.Size)//max": { + Doc: "fyne.Size.Max", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Size + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//max: arg 1: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//max: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Vector2 + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Vector2(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//max: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Vector2); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//max: arg 2: " + "expected native of type fyne.Vector2, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//max: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//max: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Max(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // min returns a new [Size] that is the minimum of s and v. + // + // Args: + // * recv - Go(fyne.Size) + // * v - Go(fyne.Vector2) + // Result: + // * Go(fyne.Size) + "Go(*fyne.Size)//min": { + Doc: "fyne.Size.Min", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Size + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//min: arg 1: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//min: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Vector2 + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Vector2(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//min: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Vector2); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//min: arg 2: " + "expected native of type fyne.Vector2, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//min: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//min: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Min(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // subtract returns a new Size that is the result of decreasing the current size + // by s2 Width and Height. + // + // Args: + // * recv - Go(fyne.Size) + // * v - Go(fyne.Vector2) + // Result: + // * Go(fyne.Size) + "Go(*fyne.Size)//subtract": { + Doc: "fyne.Size.Subtract", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Size + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//subtract: arg 1: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//subtract: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Vector2 + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Vector2(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//subtract: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Vector2); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//subtract: arg 2: " + "expected native of type fyne.Vector2, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//subtract: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//subtract: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Subtract(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // subtract-width-height returns a new Size by subtracting width and height from the current one. + // + // Args: + // * recv - Go(fyne.Size) + // * width - decimal + // * height - decimal + // Result: + // * Go(fyne.Size) + "Go(*fyne.Size)//subtract-width-height": { + Doc: "fyne.Size.SubtractWidthHeight", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Size + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//subtract-width-height: arg 1: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//subtract-width-height: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float32 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//subtract-width-height: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val float32 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//subtract-width-height: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + res0 := arg0Val.SubtractWidthHeight(arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * width - decimal + // Result: + // * decimal + "Go(*fyne.Size)//width!": { + Doc: "Set *fyne.Size Width value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Size + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//width!: arg 1: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//width!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//width!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//width!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Width = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*fyne.Size)//width?": { + Doc: "Get *fyne.Size Width value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.Size + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//width?: arg 1: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//width?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.Size)//width?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.Width)) + return resObj + }, + }, + // content returns the bytes of the bundled resource, no compression is applied + // but any compression on the resource is retained. + // + // Args: + // * recv - Go(*fyne.StaticResource) + // Result: + // * block[integer] + "Go(*fyne.StaticResource)//content": { + Doc: "(*fyne.StaticResource).Content", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.StaticResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.StaticResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//content: arg 1: " + "expected native of type *fyne.StaticResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Content() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // go-string converts a Resource object to Go code. + // This is useful if serialising to a Go file for compilation into a binary. + // + // Args: + // * recv - Go(*fyne.StaticResource) + // Result: + // * string + "Go(*fyne.StaticResource)//go-string": { + Doc: "(*fyne.StaticResource).GoString", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.StaticResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.StaticResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//go-string: arg 1: " + "expected native of type *fyne.StaticResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//go-string: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//go-string: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.GoString() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // name returns the unique name of this resource, usually matching the file it + // was generated from. + // + // Args: + // * recv - Go(*fyne.StaticResource) + // Result: + // * string + "Go(*fyne.StaticResource)//name": { + Doc: "(*fyne.StaticResource).Name", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.StaticResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.StaticResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//name: arg 1: " + "expected native of type *fyne.StaticResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Name() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * static-content - block[integer] + // Result: + // * block[integer] + "Go(*fyne.StaticResource)//static-content!": { + Doc: "Set *fyne.StaticResource StaticContent value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.StaticResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.StaticResource); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-content!: arg 1: " + "expected native of type *fyne.StaticResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-content!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-content!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []byte + switch v := arg1.(type) { + case env.Block: + newVal = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-content!: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-content!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-content!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.StaticContent = newVal + return arg0 + }, + }, + // Result: + // * block[integer] + "Go(*fyne.StaticResource)//static-content?": { + Doc: "Get *fyne.StaticResource StaticContent value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.StaticResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.StaticResource); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-content?: arg 1: " + "expected native of type *fyne.StaticResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-content?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-content?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.StaticContent)) + for i, it := range self.StaticContent { + items[i] = *env.NewInteger(int64(it)) + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // Args: + // * static-name - string + // Result: + // * string + "Go(*fyne.StaticResource)//static-name!": { + Doc: "Set *fyne.StaticResource StaticName value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.StaticResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.StaticResource); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-name!: arg 1: " + "expected native of type *fyne.StaticResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-name!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-name!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-name!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.StaticName = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*fyne.StaticResource)//static-name?": { + Doc: "Get *fyne.StaticResource StaticName value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.StaticResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.StaticResource); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-name?: arg 1: " + "expected native of type *fyne.StaticResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-name?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.StaticResource)//static-name?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.StaticName) + return resObj + }, + }, + // Args: + // * bold - bool + // Result: + // * bool + "Go(*fyne.TextStyle)//bold!": { + Doc: "Set *fyne.TextStyle Bold value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.TextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//bold!: arg 1: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//bold!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//bold!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//bold!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Bold = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*fyne.TextStyle)//bold?": { + Doc: "Get *fyne.TextStyle Bold value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.TextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//bold?: arg 1: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//bold?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//bold?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Bold)) + return resObj + }, + }, + // Args: + // * italic - bool + // Result: + // * bool + "Go(*fyne.TextStyle)//italic!": { + Doc: "Set *fyne.TextStyle Italic value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.TextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//italic!: arg 1: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//italic!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//italic!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//italic!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Italic = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*fyne.TextStyle)//italic?": { + Doc: "Get *fyne.TextStyle Italic value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.TextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//italic?: arg 1: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//italic?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//italic?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Italic)) + return resObj + }, + }, + // Args: + // * monospace - bool + // Result: + // * bool + "Go(*fyne.TextStyle)//monospace!": { + Doc: "Set *fyne.TextStyle Monospace value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.TextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//monospace!: arg 1: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//monospace!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//monospace!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//monospace!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Monospace = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*fyne.TextStyle)//monospace?": { + Doc: "Get *fyne.TextStyle Monospace value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.TextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//monospace?: arg 1: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//monospace?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//monospace?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Monospace)) + return resObj + }, + }, + // Args: + // * symbol - bool + // Result: + // * bool + "Go(*fyne.TextStyle)//symbol!": { + Doc: "Set *fyne.TextStyle Symbol value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.TextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//symbol!: arg 1: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//symbol!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//symbol!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//symbol!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Symbol = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*fyne.TextStyle)//symbol?": { + Doc: "Get *fyne.TextStyle Symbol value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.TextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//symbol?: arg 1: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//symbol?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//symbol?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Symbol)) + return resObj + }, + }, + // Args: + // * tab-width - integer + // Result: + // * integer + "Go(*fyne.TextStyle)//tab-width!": { + Doc: "Set *fyne.TextStyle TabWidth value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.TextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//tab-width!: arg 1: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//tab-width!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//tab-width!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal int + if vc, ok := arg1.(env.Integer); ok { + newVal = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//tab-width!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.TabWidth = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*fyne.TextStyle)//tab-width?": { + Doc: "Get *fyne.TextStyle TabWidth value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.TextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//tab-width?: arg 1: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//tab-width?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//tab-width?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(self.TabWidth)) + return resObj + }, + }, + // Args: + // * underline - bool + // Result: + // * bool + "Go(*fyne.TextStyle)//underline!": { + Doc: "Set *fyne.TextStyle Underline value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.TextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//underline!: arg 1: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//underline!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//underline!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//underline!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Underline = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*fyne.TextStyle)//underline?": { + Doc: "Get *fyne.TextStyle Underline value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne.TextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//underline?: arg 1: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//underline?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne.TextStyle)//underline?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Underline)) + return resObj + }, + }, + // Args: + // * ctx - Go(uintptr) + // Result: + // * Go(uintptr) + "Go(*fyne_driver.AndroidContext)//ctx!": { + Doc: "Set *fyne_driver.AndroidContext Ctx value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//ctx!: arg 1: " + "expected native of type *fyne_driver.AndroidContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//ctx!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//ctx!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal uintptr + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(uintptr); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//ctx!: arg 2: " + "expected native of type uintptr, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//ctx!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Ctx = newVal + return arg0 + }, + }, + // Result: + // * Go(uintptr) + "Go(*fyne_driver.AndroidContext)//ctx?": { + Doc: "Get *fyne_driver.AndroidContext Ctx value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//ctx?: arg 1: " + "expected native of type *fyne_driver.AndroidContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//ctx?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//ctx?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.Ctx, "Go(uintptr)") + return resObj + }, + }, + // Args: + // * env - Go(uintptr) + // Result: + // * Go(uintptr) + "Go(*fyne_driver.AndroidContext)//env!": { + Doc: "Set *fyne_driver.AndroidContext Env value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//env!: arg 1: " + "expected native of type *fyne_driver.AndroidContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//env!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//env!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal uintptr + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(uintptr); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//env!: arg 2: " + "expected native of type uintptr, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//env!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Env = newVal + return arg0 + }, + }, + // Result: + // * Go(uintptr) + "Go(*fyne_driver.AndroidContext)//env?": { + Doc: "Get *fyne_driver.AndroidContext Env value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//env?: arg 1: " + "expected native of type *fyne_driver.AndroidContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//env?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//env?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.Env, "Go(uintptr)") + return resObj + }, + }, + // Args: + // * vm - Go(uintptr) + // Result: + // * Go(uintptr) + "Go(*fyne_driver.AndroidContext)//vm!": { + Doc: "Set *fyne_driver.AndroidContext VM value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//vm!: arg 1: " + "expected native of type *fyne_driver.AndroidContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//vm!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//vm!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal uintptr + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(uintptr); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//vm!: arg 2: " + "expected native of type uintptr, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//vm!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.VM = newVal + return arg0 + }, + }, + // Result: + // * Go(uintptr) + "Go(*fyne_driver.AndroidContext)//vm?": { + Doc: "Get *fyne_driver.AndroidContext VM value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//vm?: arg 1: " + "expected native of type *fyne_driver.AndroidContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//vm?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidContext)//vm?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.VM, "Go(uintptr)") + return resObj + }, + }, + // Args: + // * android-context - Go(fyne_driver.AndroidContext) + // Result: + // * Go(fyne_driver.AndroidContext) + "Go(*fyne_driver.AndroidWindowContext)//android-context!": { + Doc: "Set *fyne_driver.AndroidWindowContext AndroidContext value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//android-context!: arg 1: " + "expected native of type *fyne_driver.AndroidWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//android-context!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//android-context!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne_driver.AndroidContext + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidContext); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//android-context!: arg 2: " + "expected native of type *fyne_driver.AndroidContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//android-context!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//android-context!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.AndroidContext = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne_driver.AndroidContext) + "Go(*fyne_driver.AndroidWindowContext)//android-context?": { + Doc: "Get *fyne_driver.AndroidWindowContext AndroidContext value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//android-context?: arg 1: " + "expected native of type *fyne_driver.AndroidWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//android-context?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//android-context?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.AndroidContext, "Go(*fyne_driver.AndroidContext)") + return resObj + }, + }, + // Args: + // * ctx - Go(uintptr) + // Result: + // * Go(uintptr) + "Go(*fyne_driver.AndroidWindowContext)//ctx!": { + Doc: "Set *fyne_driver.AndroidWindowContext Ctx value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//ctx!: arg 1: " + "expected native of type *fyne_driver.AndroidWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//ctx!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//ctx!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal uintptr + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(uintptr); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//ctx!: arg 2: " + "expected native of type uintptr, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//ctx!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Ctx = newVal + return arg0 + }, + }, + // Result: + // * Go(uintptr) + "Go(*fyne_driver.AndroidWindowContext)//ctx?": { + Doc: "Get *fyne_driver.AndroidWindowContext Ctx value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//ctx?: arg 1: " + "expected native of type *fyne_driver.AndroidWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//ctx?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//ctx?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.Ctx, "Go(uintptr)") + return resObj + }, + }, + // Args: + // * env - Go(uintptr) + // Result: + // * Go(uintptr) + "Go(*fyne_driver.AndroidWindowContext)//env!": { + Doc: "Set *fyne_driver.AndroidWindowContext Env value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//env!: arg 1: " + "expected native of type *fyne_driver.AndroidWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//env!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//env!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal uintptr + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(uintptr); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//env!: arg 2: " + "expected native of type uintptr, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//env!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Env = newVal + return arg0 + }, + }, + // Result: + // * Go(uintptr) + "Go(*fyne_driver.AndroidWindowContext)//env?": { + Doc: "Get *fyne_driver.AndroidWindowContext Env value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//env?: arg 1: " + "expected native of type *fyne_driver.AndroidWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//env?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//env?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.Env, "Go(uintptr)") + return resObj + }, + }, + // Args: + // * native-window - Go(uintptr) + // Result: + // * Go(uintptr) + "Go(*fyne_driver.AndroidWindowContext)//native-window!": { + Doc: "Set *fyne_driver.AndroidWindowContext NativeWindow value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//native-window!: arg 1: " + "expected native of type *fyne_driver.AndroidWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//native-window!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//native-window!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal uintptr + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(uintptr); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//native-window!: arg 2: " + "expected native of type uintptr, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//native-window!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.NativeWindow = newVal + return arg0 + }, + }, + // Result: + // * Go(uintptr) + "Go(*fyne_driver.AndroidWindowContext)//native-window?": { + Doc: "Get *fyne_driver.AndroidWindowContext NativeWindow value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//native-window?: arg 1: " + "expected native of type *fyne_driver.AndroidWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//native-window?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//native-window?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.NativeWindow, "Go(uintptr)") + return resObj + }, + }, + // Args: + // * vm - Go(uintptr) + // Result: + // * Go(uintptr) + "Go(*fyne_driver.AndroidWindowContext)//vm!": { + Doc: "Set *fyne_driver.AndroidWindowContext VM value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//vm!: arg 1: " + "expected native of type *fyne_driver.AndroidWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//vm!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//vm!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal uintptr + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(uintptr); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//vm!: arg 2: " + "expected native of type uintptr, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//vm!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.VM = newVal + return arg0 + }, + }, + // Result: + // * Go(uintptr) + "Go(*fyne_driver.AndroidWindowContext)//vm?": { + Doc: "Get *fyne_driver.AndroidWindowContext VM value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.AndroidWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.AndroidWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//vm?: arg 1: " + "expected native of type *fyne_driver.AndroidWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//vm?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.AndroidWindowContext)//vm?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.VM, "Go(uintptr)") + return resObj + }, + }, + // Args: + // * ns-window - Go(uintptr) + // Result: + // * Go(uintptr) + "Go(*fyne_driver.MacWindowContext)//ns-window!": { + Doc: "Set *fyne_driver.MacWindowContext NSWindow value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.MacWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.MacWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.MacWindowContext)//ns-window!: arg 1: " + "expected native of type *fyne_driver.MacWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.MacWindowContext)//ns-window!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.MacWindowContext)//ns-window!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal uintptr + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(uintptr); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.MacWindowContext)//ns-window!: arg 2: " + "expected native of type uintptr, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.MacWindowContext)//ns-window!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.NSWindow = newVal + return arg0 + }, + }, + // Result: + // * Go(uintptr) + "Go(*fyne_driver.MacWindowContext)//ns-window?": { + Doc: "Get *fyne_driver.MacWindowContext NSWindow value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.MacWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.MacWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.MacWindowContext)//ns-window?: arg 1: " + "expected native of type *fyne_driver.MacWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.MacWindowContext)//ns-window?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.MacWindowContext)//ns-window?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.NSWindow, "Go(uintptr)") + return resObj + }, + }, + // Args: + // * wayland-surface - Go(uintptr) + // Result: + // * Go(uintptr) + "Go(*fyne_driver.WaylandWindowContext)//wayland-surface!": { + Doc: "Set *fyne_driver.WaylandWindowContext WaylandSurface value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.WaylandWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.WaylandWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WaylandWindowContext)//wayland-surface!: arg 1: " + "expected native of type *fyne_driver.WaylandWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WaylandWindowContext)//wayland-surface!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WaylandWindowContext)//wayland-surface!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal uintptr + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(uintptr); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WaylandWindowContext)//wayland-surface!: arg 2: " + "expected native of type uintptr, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WaylandWindowContext)//wayland-surface!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.WaylandSurface = newVal + return arg0 + }, + }, + // Result: + // * Go(uintptr) + "Go(*fyne_driver.WaylandWindowContext)//wayland-surface?": { + Doc: "Get *fyne_driver.WaylandWindowContext WaylandSurface value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.WaylandWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.WaylandWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WaylandWindowContext)//wayland-surface?: arg 1: " + "expected native of type *fyne_driver.WaylandWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WaylandWindowContext)//wayland-surface?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WaylandWindowContext)//wayland-surface?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.WaylandSurface, "Go(uintptr)") + return resObj + }, + }, + // Args: + // * hwnd - Go(uintptr) + // Result: + // * Go(uintptr) + "Go(*fyne_driver.WindowsWindowContext)//hwnd!": { + Doc: "Set *fyne_driver.WindowsWindowContext HWND value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.WindowsWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.WindowsWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WindowsWindowContext)//hwnd!: arg 1: " + "expected native of type *fyne_driver.WindowsWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WindowsWindowContext)//hwnd!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WindowsWindowContext)//hwnd!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal uintptr + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(uintptr); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WindowsWindowContext)//hwnd!: arg 2: " + "expected native of type uintptr, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WindowsWindowContext)//hwnd!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.HWND = newVal + return arg0 + }, + }, + // Result: + // * Go(uintptr) + "Go(*fyne_driver.WindowsWindowContext)//hwnd?": { + Doc: "Get *fyne_driver.WindowsWindowContext HWND value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.WindowsWindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.WindowsWindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WindowsWindowContext)//hwnd?: arg 1: " + "expected native of type *fyne_driver.WindowsWindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WindowsWindowContext)//hwnd?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.WindowsWindowContext)//hwnd?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.HWND, "Go(uintptr)") + return resObj + }, + }, + // Args: + // * window-handle - Go(uintptr) + // Result: + // * Go(uintptr) + "Go(*fyne_driver.X11WindowContext)//window-handle!": { + Doc: "Set *fyne_driver.X11WindowContext WindowHandle value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.X11WindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.X11WindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.X11WindowContext)//window-handle!: arg 1: " + "expected native of type *fyne_driver.X11WindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.X11WindowContext)//window-handle!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.X11WindowContext)//window-handle!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal uintptr + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(uintptr); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.X11WindowContext)//window-handle!: arg 2: " + "expected native of type uintptr, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.X11WindowContext)//window-handle!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.WindowHandle = newVal + return arg0 + }, + }, + // Result: + // * Go(uintptr) + "Go(*fyne_driver.X11WindowContext)//window-handle?": { + Doc: "Get *fyne_driver.X11WindowContext WindowHandle value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *fyne_driver.X11WindowContext + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne_driver.X11WindowContext); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.X11WindowContext)//window-handle?: arg 1: " + "expected native of type *fyne_driver.X11WindowContext, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.X11WindowContext)//window-handle?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*fyne_driver.X11WindowContext)//window-handle?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.WindowHandle, "Go(uintptr)") + return resObj + }, + }, + // Args: + // * bottom-padding - decimal + // Result: + // * decimal + "Go(*layout.CustomPaddedLayout)//bottom-padding!": { + Doc: "Set *layout.CustomPaddedLayout BottomPadding value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *layout.CustomPaddedLayout + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.CustomPaddedLayout); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//bottom-padding!: arg 1: " + "expected native of type *layout.CustomPaddedLayout, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//bottom-padding!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//bottom-padding!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//bottom-padding!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.BottomPadding = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*layout.CustomPaddedLayout)//bottom-padding?": { + Doc: "Get *layout.CustomPaddedLayout BottomPadding value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *layout.CustomPaddedLayout + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.CustomPaddedLayout); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//bottom-padding?: arg 1: " + "expected native of type *layout.CustomPaddedLayout, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//bottom-padding?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//bottom-padding?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.BottomPadding)) + return resObj + }, + }, + // layout is called to pack all child objects into a specified size. + // For CustomPaddedlayout this sets all children to the full size passed minus the given paddings all around. + // + // Args: + // * recv - Go(layout.CustomPaddedlayout) + // * objects - block[Go(fyne.CanvasObject)] + // * size - Go(fyne.Size) + "Go(*layout.CustomPaddedLayout)//layout": { + Doc: "layout.CustomPaddedLayout.Layout", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val layout.CustomPaddedLayout + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.CustomPaddedLayout); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//layout: arg 1: " + "expected native of type *layout.CustomPaddedLayout, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//layout: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []fyne.CanvasObject + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//layout: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//layout: arg 2: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//layout: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//layout: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//layout: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//layout: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Size + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//layout: arg 3: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//layout: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Layout(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * left-padding - decimal + // Result: + // * decimal + "Go(*layout.CustomPaddedLayout)//left-padding!": { + Doc: "Set *layout.CustomPaddedLayout LeftPadding value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *layout.CustomPaddedLayout + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.CustomPaddedLayout); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//left-padding!: arg 1: " + "expected native of type *layout.CustomPaddedLayout, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//left-padding!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//left-padding!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//left-padding!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.LeftPadding = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*layout.CustomPaddedLayout)//left-padding?": { + Doc: "Get *layout.CustomPaddedLayout LeftPadding value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *layout.CustomPaddedLayout + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.CustomPaddedLayout); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//left-padding?: arg 1: " + "expected native of type *layout.CustomPaddedLayout, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//left-padding?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//left-padding?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.LeftPadding)) + return resObj + }, + }, + // min-size finds the smallest size that satisfies all the child objects. + // For CustomPaddedLayout this is determined simply as the min-size of the largest child plus the given paddings all around. + // + // Args: + // * recv - Go(layout.CustomPaddedLayout) + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(fyne.Size) + "Go(*layout.CustomPaddedLayout)//min-size": { + Doc: "layout.CustomPaddedLayout.MinSize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val layout.CustomPaddedLayout + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.CustomPaddedLayout); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//min-size: arg 1: " + "expected native of type *layout.CustomPaddedLayout, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []fyne.CanvasObject + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//min-size: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//min-size: arg 2: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//min-size: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//min-size: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//min-size: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//min-size: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * right-padding - decimal + // Result: + // * decimal + "Go(*layout.CustomPaddedLayout)//right-padding!": { + Doc: "Set *layout.CustomPaddedLayout RightPadding value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *layout.CustomPaddedLayout + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.CustomPaddedLayout); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//right-padding!: arg 1: " + "expected native of type *layout.CustomPaddedLayout, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//right-padding!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//right-padding!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//right-padding!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.RightPadding = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*layout.CustomPaddedLayout)//right-padding?": { + Doc: "Get *layout.CustomPaddedLayout RightPadding value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *layout.CustomPaddedLayout + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.CustomPaddedLayout); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//right-padding?: arg 1: " + "expected native of type *layout.CustomPaddedLayout, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//right-padding?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//right-padding?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.RightPadding)) + return resObj + }, + }, + // Args: + // * top-padding - decimal + // Result: + // * decimal + "Go(*layout.CustomPaddedLayout)//top-padding!": { + Doc: "Set *layout.CustomPaddedLayout TopPadding value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *layout.CustomPaddedLayout + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.CustomPaddedLayout); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//top-padding!: arg 1: " + "expected native of type *layout.CustomPaddedLayout, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//top-padding!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//top-padding!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float32 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//top-padding!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.TopPadding = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*layout.CustomPaddedLayout)//top-padding?": { + Doc: "Get *layout.CustomPaddedLayout TopPadding value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *layout.CustomPaddedLayout + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.CustomPaddedLayout); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//top-padding?: arg 1: " + "expected native of type *layout.CustomPaddedLayout, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//top-padding?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.CustomPaddedLayout)//top-padding?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.TopPadding)) + return resObj + }, + }, + // expand-horizontal returns whether or not this spacer expands on the horizontal axis + // + // Args: + // * recv - Go(*layout.Spacer) + // Result: + // * bool + "Go(*layout.Spacer)//expand-horizontal": { + Doc: "(*layout.Spacer).ExpandHorizontal", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *layout.Spacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.Spacer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//expand-horizontal: arg 1: " + "expected native of type *layout.Spacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//expand-horizontal: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//expand-horizontal: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ExpandHorizontal() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // expand-vertical returns whether or not this spacer expands on the vertical axis + // + // Args: + // * recv - Go(*layout.Spacer) + // Result: + // * bool + "Go(*layout.Spacer)//expand-vertical": { + Doc: "(*layout.Spacer).ExpandVertical", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *layout.Spacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.Spacer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//expand-vertical: arg 1: " + "expected native of type *layout.Spacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//expand-vertical: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//expand-vertical: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ExpandVertical() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * fix-horizontal - bool + // Result: + // * bool + "Go(*layout.Spacer)//fix-horizontal!": { + Doc: "Set *layout.Spacer FixHorizontal value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *layout.Spacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.Spacer); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//fix-horizontal!: arg 1: " + "expected native of type *layout.Spacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//fix-horizontal!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//fix-horizontal!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//fix-horizontal!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.FixHorizontal = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*layout.Spacer)//fix-horizontal?": { + Doc: "Get *layout.Spacer FixHorizontal value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *layout.Spacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.Spacer); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//fix-horizontal?: arg 1: " + "expected native of type *layout.Spacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//fix-horizontal?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//fix-horizontal?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.FixHorizontal)) + return resObj + }, + }, + // Args: + // * fix-vertical - bool + // Result: + // * bool + "Go(*layout.Spacer)//fix-vertical!": { + Doc: "Set *layout.Spacer FixVertical value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *layout.Spacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.Spacer); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//fix-vertical!: arg 1: " + "expected native of type *layout.Spacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//fix-vertical!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//fix-vertical!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//fix-vertical!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.FixVertical = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*layout.Spacer)//fix-vertical?": { + Doc: "Get *layout.Spacer FixVertical value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *layout.Spacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.Spacer); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//fix-vertical?: arg 1: " + "expected native of type *layout.Spacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//fix-vertical?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//fix-vertical?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.FixVertical)) + return resObj + }, + }, + // hide removes this Spacer from layout calculations + // + // Args: + // * recv - Go(*layout.Spacer) + "Go(*layout.Spacer)//hide": { + Doc: "(*layout.Spacer).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *layout.Spacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.Spacer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//hide: arg 1: " + "expected native of type *layout.Spacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size returns a 0 size as a Spacer can shrink to no actual size + // + // Args: + // * recv - Go(*layout.Spacer) + // Result: + // * Go(fyne.Size) + "Go(*layout.Spacer)//min-size": { + Doc: "(*layout.Spacer).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *layout.Spacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.Spacer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//min-size: arg 1: " + "expected native of type *layout.Spacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // move sets a new position for the Spacer - this will be called by the layout + // + // Args: + // * recv - Go(*layout.Spacer) + // * pos - Go(fyne.Position) + "Go(*layout.Spacer)//move": { + Doc: "(*layout.Spacer).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *layout.Spacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.Spacer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//move: arg 1: " + "expected native of type *layout.Spacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // position returns the current position of this Spacer + // + // Args: + // * recv - Go(*layout.Spacer) + // Result: + // * Go(fyne.position) + "Go(*layout.Spacer)//position": { + Doc: "(*layout.Spacer).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *layout.Spacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.Spacer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//position: arg 1: " + "expected native of type *layout.Spacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // refresh does nothing for a spacer but is part of the CanvasObject definition + // + // Args: + // * recv - Go(*layout.Spacer) + "Go(*layout.Spacer)//refresh": { + Doc: "(*layout.Spacer).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *layout.Spacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.Spacer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//refresh: arg 1: " + "expected native of type *layout.Spacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize sets a new size for the Spacer - this will be called by the layout + // + // Args: + // * recv - Go(*layout.Spacer) + // * size - Go(fyne.Size) + "Go(*layout.Spacer)//resize": { + Doc: "(*layout.Spacer).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *layout.Spacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.Spacer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//resize: arg 1: " + "expected native of type *layout.Spacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // show sets the Spacer to be part of the layout calculations + // + // Args: + // * recv - Go(*layout.Spacer) + "Go(*layout.Spacer)//show": { + Doc: "(*layout.Spacer).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *layout.Spacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.Spacer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//show: arg 1: " + "expected native of type *layout.Spacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // size returns the current size of this Spacer + // + // Args: + // * recv - Go(*layout.Spacer) + // Result: + // * Go(fyne.size) + "Go(*layout.Spacer)//size": { + Doc: "(*layout.Spacer).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *layout.Spacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.Spacer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//size: arg 1: " + "expected native of type *layout.Spacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // visible returns true if this spacer should affect the layout + // + // Args: + // * recv - Go(*layout.Spacer) + // Result: + // * bool + "Go(*layout.Spacer)//visible": { + Doc: "(*layout.Spacer).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *layout.Spacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*layout.Spacer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//visible: arg 1: " + "expected native of type *layout.Spacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*layout.Spacer)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * absolute-position - Go(fyne.Position) + // Result: + // * Go(fyne.Position) + "Go(*mobile.TouchEvent)//absolute-position!": { + Doc: "Set *mobile.TouchEvent AbsolutePosition value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *mobile.TouchEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//absolute-position!: arg 1: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//absolute-position!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//absolute-position!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//absolute-position!: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//absolute-position!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//absolute-position!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.AbsolutePosition = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Position) + "Go(*mobile.TouchEvent)//absolute-position?": { + Doc: "Get *mobile.TouchEvent AbsolutePosition value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *mobile.TouchEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//absolute-position?: arg 1: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//absolute-position?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//absolute-position?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.AbsolutePosition, "Go(*fyne.Position)") + return resObj + }, + }, + // Args: + // * point-event - Go(fyne.PointEvent) + // Result: + // * Go(fyne.PointEvent) + "Go(*mobile.TouchEvent)//point-event!": { + Doc: "Set *mobile.TouchEvent PointEvent value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *mobile.TouchEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//point-event!: arg 1: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//point-event!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//point-event!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//point-event!: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//point-event!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//point-event!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.PointEvent = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.PointEvent) + "Go(*mobile.TouchEvent)//point-event?": { + Doc: "Get *mobile.TouchEvent PointEvent value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *mobile.TouchEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//point-event?: arg 1: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//point-event?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//point-event?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.PointEvent, "Go(*fyne.PointEvent)") + return resObj + }, + }, + // Args: + // * position - Go(fyne.Position) + // Result: + // * Go(fyne.Position) + "Go(*mobile.TouchEvent)//position!": { + Doc: "Set *mobile.TouchEvent Position value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *mobile.TouchEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//position!: arg 1: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//position!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//position!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//position!: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//position!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//position!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Position = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Position) + "Go(*mobile.TouchEvent)//position?": { + Doc: "Get *mobile.TouchEvent Position value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *mobile.TouchEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//position?: arg 1: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//position?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*mobile.TouchEvent)//position?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.Position, "Go(*fyne.Position)") + return resObj + }, + }, + // Args: + // * extensions - block[string] + // Result: + // * block[string] + "Go(*storage.ExtensionFileFilter)//extensions!": { + Doc: "Set *storage.ExtensionFileFilter Extensions value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *storage.ExtensionFileFilter + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*storage.ExtensionFileFilter); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//extensions!: arg 1: " + "expected native of type *storage.ExtensionFileFilter, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//extensions!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//extensions!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []string + switch v := arg1.(type) { + case env.Block: + newVal = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//extensions!: arg 2: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//extensions!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//extensions!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Extensions = newVal + return arg0 + }, + }, + // Result: + // * block[string] + "Go(*storage.ExtensionFileFilter)//extensions?": { + Doc: "Get *storage.ExtensionFileFilter Extensions value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *storage.ExtensionFileFilter + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*storage.ExtensionFileFilter); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//extensions?: arg 1: " + "expected native of type *storage.ExtensionFileFilter, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//extensions?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//extensions?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Extensions)) + for i, it := range self.Extensions { + items[i] = *env.NewString(it) + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // matches returns true if a file URI has one of the filtered extensions. + // + // Args: + // * recv - Go(*storage.ExtensionFileFilter) + // * uri - Go(fyne.URI) + // Result: + // * bool + "Go(*storage.ExtensionFileFilter)//matches": { + Doc: "(*storage.ExtensionFileFilter).Matches", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *storage.ExtensionFileFilter + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*storage.ExtensionFileFilter); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//matches: arg 1: " + "expected native of type *storage.ExtensionFileFilter, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//matches: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//matches: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//matches: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//matches: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//matches: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*storage.ExtensionFileFilter)//matches: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Matches(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // matches returns true if a file URI has one of the filtered mimetypes. + // + // Args: + // * recv - Go(*storage.MimeTypeFileFilter) + // * uri - Go(fyne.URI) + // Result: + // * bool + "Go(*storage.MimeTypeFileFilter)//matches": { + Doc: "(*storage.MimeTypeFileFilter).Matches", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *storage.MimeTypeFileFilter + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*storage.MimeTypeFileFilter); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//matches: arg 1: " + "expected native of type *storage.MimeTypeFileFilter, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//matches: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//matches: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//matches: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//matches: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//matches: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//matches: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Matches(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * mime-types - block[string] + // Result: + // * block[string] + "Go(*storage.MimeTypeFileFilter)//mime-types!": { + Doc: "Set *storage.MimeTypeFileFilter MimeTypes value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *storage.MimeTypeFileFilter + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*storage.MimeTypeFileFilter); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//mime-types!: arg 1: " + "expected native of type *storage.MimeTypeFileFilter, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//mime-types!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//mime-types!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []string + switch v := arg1.(type) { + case env.Block: + newVal = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//mime-types!: arg 2: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//mime-types!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//mime-types!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.MimeTypes = newVal + return arg0 + }, + }, + // Result: + // * block[string] + "Go(*storage.MimeTypeFileFilter)//mime-types?": { + Doc: "Get *storage.MimeTypeFileFilter MimeTypes value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *storage.MimeTypeFileFilter + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*storage.MimeTypeFileFilter); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//mime-types?: arg 1: " + "expected native of type *storage.MimeTypeFileFilter, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//mime-types?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*storage.MimeTypeFileFilter)//mime-types?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.MimeTypes)) + for i, it := range self.MimeTypes { + items[i] = *env.NewString(it) + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // content returns the disabled style content of the correct resource for the current theme + // + // Args: + // * recv - Go(*theme.DisabledResource) + // Result: + // * block[integer] + "Go(*theme.DisabledResource)//content": { + Doc: "(*theme.DisabledResource).Content", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.DisabledResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.DisabledResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.DisabledResource)//content: arg 1: " + "expected native of type *theme.DisabledResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.DisabledResource)//content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.DisabledResource)//content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Content() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // name returns the resource source name prefixed with `disabled_` (used for caching) + // + // Args: + // * recv - Go(*theme.DisabledResource) + // Result: + // * string + "Go(*theme.DisabledResource)//name": { + Doc: "(*theme.DisabledResource).Name", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.DisabledResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.DisabledResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.DisabledResource)//name: arg 1: " + "expected native of type *theme.DisabledResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.DisabledResource)//name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.DisabledResource)//name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Name() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // content returns the underlying content of the resource adapted to the current background color. + // + // Args: + // * recv - Go(*theme.ErrorThemedResource) + // Result: + // * block[integer] + "Go(*theme.ErrorThemedResource)//content": { + Doc: "(*theme.ErrorThemedResource).Content", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.ErrorThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.ErrorThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.ErrorThemedResource)//content: arg 1: " + "expected native of type *theme.ErrorThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.ErrorThemedResource)//content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.ErrorThemedResource)//content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Content() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // name returns the underlying resource name (used for caching). + // + // Args: + // * recv - Go(*theme.ErrorThemedResource) + // Result: + // * string + "Go(*theme.ErrorThemedResource)//name": { + Doc: "(*theme.ErrorThemedResource).Name", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.ErrorThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.ErrorThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.ErrorThemedResource)//name: arg 1: " + "expected native of type *theme.ErrorThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.ErrorThemedResource)//name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.ErrorThemedResource)//name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Name() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // original returns the underlying resource that this error themed resource was adapted from + // + // Args: + // * recv - Go(*theme.ErrorThemedResource) + // Result: + // * Go(fyne.Resource) + "Go(*theme.ErrorThemedResource)//original": { + Doc: "(*theme.ErrorThemedResource).Original", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.ErrorThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.ErrorThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.ErrorThemedResource)//original: arg 1: " + "expected native of type *theme.ErrorThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.ErrorThemedResource)//original: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.ErrorThemedResource)//original: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Original() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // content returns the underlying content of the resource adapted to the current background color. + // + // Args: + // * recv - Go(*theme.InvertedThemedResource) + // Result: + // * block[integer] + "Go(*theme.InvertedThemedResource)//content": { + Doc: "(*theme.InvertedThemedResource).Content", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.InvertedThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.InvertedThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.InvertedThemedResource)//content: arg 1: " + "expected native of type *theme.InvertedThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.InvertedThemedResource)//content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.InvertedThemedResource)//content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Content() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // name returns the underlying resource name (used for caching). + // + // Args: + // * recv - Go(*theme.InvertedThemedResource) + // Result: + // * string + "Go(*theme.InvertedThemedResource)//name": { + Doc: "(*theme.InvertedThemedResource).Name", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.InvertedThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.InvertedThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.InvertedThemedResource)//name: arg 1: " + "expected native of type *theme.InvertedThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.InvertedThemedResource)//name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.InvertedThemedResource)//name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Name() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // original returns the underlying resource that this inverted themed resource was adapted from + // + // Args: + // * recv - Go(*theme.InvertedThemedResource) + // Result: + // * Go(fyne.Resource) + "Go(*theme.InvertedThemedResource)//original": { + Doc: "(*theme.InvertedThemedResource).Original", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.InvertedThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.InvertedThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.InvertedThemedResource)//original: arg 1: " + "expected native of type *theme.InvertedThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.InvertedThemedResource)//original: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.InvertedThemedResource)//original: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Original() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // theme-color-name returns the fyne.theme-color-name that is used as foreground color. + // @implements fyne.ThemedResource + // + // Args: + // * recv - Go(*theme.InvertedThemedResource) + // Result: + // * string + "Go(*theme.InvertedThemedResource)//theme-color-name": { + Doc: "(*theme.InvertedThemedResource).ThemeColorName", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.InvertedThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.InvertedThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.InvertedThemedResource)//theme-color-name: arg 1: " + "expected native of type *theme.InvertedThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.InvertedThemedResource)//theme-color-name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.InvertedThemedResource)//theme-color-name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ThemeColorName() + var res0Obj env.Object + res0Obj = *env.NewString(string(res0)) + return res0Obj + }, + }, + // content returns the underlying content of the resource adapted to the current background color. + // + // Args: + // * recv - Go(*theme.PrimaryThemedResource) + // Result: + // * block[integer] + "Go(*theme.PrimaryThemedResource)//content": { + Doc: "(*theme.PrimaryThemedResource).Content", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.PrimaryThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.PrimaryThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.PrimaryThemedResource)//content: arg 1: " + "expected native of type *theme.PrimaryThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.PrimaryThemedResource)//content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.PrimaryThemedResource)//content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Content() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // name returns the underlying resource name (used for caching). + // + // Args: + // * recv - Go(*theme.PrimaryThemedResource) + // Result: + // * string + "Go(*theme.PrimaryThemedResource)//name": { + Doc: "(*theme.PrimaryThemedResource).Name", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.PrimaryThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.PrimaryThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.PrimaryThemedResource)//name: arg 1: " + "expected native of type *theme.PrimaryThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.PrimaryThemedResource)//name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.PrimaryThemedResource)//name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Name() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // original returns the underlying resource that this primary themed resource was adapted from + // + // Args: + // * recv - Go(*theme.PrimaryThemedResource) + // Result: + // * Go(fyne.Resource) + "Go(*theme.PrimaryThemedResource)//original": { + Doc: "(*theme.PrimaryThemedResource).Original", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.PrimaryThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.PrimaryThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.PrimaryThemedResource)//original: arg 1: " + "expected native of type *theme.PrimaryThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.PrimaryThemedResource)//original: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.PrimaryThemedResource)//original: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Original() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // Args: + // * color-name - string + // Result: + // * string + "Go(*theme.ThemedResource)//color-name!": { + Doc: "Set *theme.ThemedResource ColorName value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *theme.ThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.ThemedResource); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//color-name!: arg 1: " + "expected native of type *theme.ThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//color-name!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//color-name!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.ThemeColorName + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.ThemeColorName + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeColorName) + } + if natValOk { + newVal = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//color-name!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.ThemeColorName(u) + } + } + self.ColorName = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*theme.ThemedResource)//color-name?": { + Doc: "Get *theme.ThemedResource ColorName value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *theme.ThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.ThemedResource); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//color-name?: arg 1: " + "expected native of type *theme.ThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//color-name?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//color-name?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(string(self.ColorName)) + return resObj + }, + }, + // content returns the underlying content of the resource adapted to the current text color. + // + // Args: + // * recv - Go(*theme.ThemedResource) + // Result: + // * block[integer] + "Go(*theme.ThemedResource)//content": { + Doc: "(*theme.ThemedResource).Content", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.ThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.ThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//content: arg 1: " + "expected native of type *theme.ThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Content() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // error returns a different resource for indicating an error. + // + // Args: + // * recv - Go(*theme.ThemedResource) + // Result: + // * Go(*theme.errorThemedResource) + "Go(*theme.ThemedResource)//error": { + Doc: "(*theme.ThemedResource).Error", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.ThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.ThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//error: arg 1: " + "expected native of type *theme.ThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//error: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//error: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Error() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*theme.ErrorThemedResource)") + return res0Obj + }, + }, + // name returns the underlying resource name (used for caching). + // + // Args: + // * recv - Go(*theme.ThemedResource) + // Result: + // * string + "Go(*theme.ThemedResource)//name": { + Doc: "(*theme.ThemedResource).Name", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.ThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.ThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//name: arg 1: " + "expected native of type *theme.ThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Name() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // theme-color-name returns the fyne.theme-color-name that is used as foreground color. + // @implements fyne.ThemedResource + // + // Args: + // * recv - Go(*theme.ThemedResource) + // Result: + // * string + "Go(*theme.ThemedResource)//theme-color-name": { + Doc: "(*theme.ThemedResource).ThemeColorName", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *theme.ThemedResource + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*theme.ThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//theme-color-name: arg 1: " + "expected native of type *theme.ThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//theme-color-name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*theme.ThemedResource)//theme-color-name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ThemeColorName() + var res0Obj env.Object + res0Obj = *env.NewString(string(res0)) + return res0Obj + }, + }, + // append adds the given item to this Accordion. + // + // Args: + // * recv - Go(*widget.Accordion) + // * item - Go(*widget.AccordionItem) + "Go(*widget.Accordion)//append": { + Doc: "(*widget.Accordion).Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//append: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *widget.AccordionItem + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.AccordionItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//append: arg 2: " + "expected native of type *widget.AccordionItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//append: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//append: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Append(arg1Val) + return arg0 + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Accordion)//base-widget!": { + Doc: "Set *widget.Accordion BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//base-widget!: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Accordion)//base-widget?": { + Doc: "Get *widget.Accordion BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//base-widget?: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // close collapses the item at the given index. + // + // Args: + // * recv - Go(*widget.Accordion) + // * index - integer + "Go(*widget.Accordion)//close": { + Doc: "(*widget.Accordion).Close", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//close: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//close: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//close: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//close: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.Close(arg1Val) + return arg0 + }, + }, + // close-all collapses all items. + // + // Args: + // * recv - Go(*widget.Accordion) + "Go(*widget.Accordion)//close-all": { + Doc: "(*widget.Accordion).CloseAll", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//close-all: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//close-all: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//close-all: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.CloseAll() + return arg0 + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.Accordion) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Accordion)//create-renderer": { + Doc: "(*widget.Accordion).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//create-renderer: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Accordion) + // * wid - Go(fyne.Widget) + "Go(*widget.Accordion)//extend-base-widget": { + Doc: "(*widget.Accordion).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//extend-base-widget: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Accordion)//hidden!": { + Doc: "Set *widget.Accordion Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//hidden!: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Accordion)//hidden?": { + Doc: "Get *widget.Accordion Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//hidden?: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Accordion) + "Go(*widget.Accordion)//hide": { + Doc: "(*widget.Accordion).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//hide: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * items - block[Go(*widget.AccordionItem)] + // Result: + // * block[Go(*widget.AccordionItem)] + "Go(*widget.Accordion)//items!": { + Doc: "Set *widget.Accordion Items value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//items!: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//items!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//items!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []*widget.AccordionItem + switch v := arg1.(type) { + case env.Block: + newVal = make([]*widget.AccordionItem, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.AccordionItem); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//items!: arg 2: " + "block item: " + "expected native of type *widget.AccordionItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//items!: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//items!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//items!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//items!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Items = newVal + return arg0 + }, + }, + // Result: + // * block[Go(*widget.AccordionItem)] + "Go(*widget.Accordion)//items?": { + Doc: "Get *widget.Accordion Items value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//items?: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//items?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//items?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Items)) + for i, it := range self.Items { + items[i] = *env.NewNative(ps.Idx, it, "Go(*widget.AccordionItem)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // min-size returns the size that this widget should not shrink below. + // + // Args: + // * recv - Go(*widget.Accordion) + // Result: + // * Go(fyne.Size) + "Go(*widget.Accordion)//min-size": { + Doc: "(*widget.Accordion).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//min-size: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Accordion) + // * pos - Go(fyne.Position) + "Go(*widget.Accordion)//move": { + Doc: "(*widget.Accordion).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//move: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * multi-open - bool + // Result: + // * bool + "Go(*widget.Accordion)//multi-open!": { + Doc: "Set *widget.Accordion MultiOpen value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//multi-open!: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//multi-open!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//multi-open!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//multi-open!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.MultiOpen = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Accordion)//multi-open?": { + Doc: "Get *widget.Accordion MultiOpen value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//multi-open?: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//multi-open?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//multi-open?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.MultiOpen)) + return resObj + }, + }, + // open expands the item at the given index. + // + // Args: + // * recv - Go(*widget.Accordion) + // * index - integer + "Go(*widget.Accordion)//open": { + Doc: "(*widget.Accordion).Open", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//open: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//open: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//open: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//open: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.Open(arg1Val) + return arg0 + }, + }, + // open-all expands all items. + // + // Args: + // * recv - Go(*widget.Accordion) + "Go(*widget.Accordion)//open-all": { + Doc: "(*widget.Accordion).OpenAll", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//open-all: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//open-all: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//open-all: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.OpenAll() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Accordion) + // Result: + // * Go(fyne.position) + "Go(*widget.Accordion)//position": { + Doc: "(*widget.Accordion).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//position: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Accordion) + "Go(*widget.Accordion)//refresh": { + Doc: "(*widget.Accordion).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//refresh: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // remove deletes the given item from this Accordion. + // + // Args: + // * recv - Go(*widget.Accordion) + // * item - Go(*widget.AccordionItem) + "Go(*widget.Accordion)//remove": { + Doc: "(*widget.Accordion).Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//remove: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *widget.AccordionItem + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.AccordionItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//remove: arg 2: " + "expected native of type *widget.AccordionItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//remove: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//remove: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Remove(arg1Val) + return arg0 + }, + }, + // remove-index deletes the item at the given index from this Accordion. + // + // Args: + // * recv - Go(*widget.Accordion) + // * index - integer + "Go(*widget.Accordion)//remove-index": { + Doc: "(*widget.Accordion).RemoveIndex", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//remove-index: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//remove-index: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//remove-index: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//remove-index: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.RemoveIndex(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Accordion) + // * size - Go(fyne.Size) + "Go(*widget.Accordion)//resize": { + Doc: "(*widget.Accordion).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//resize: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Accordion) + "Go(*widget.Accordion)//show": { + Doc: "(*widget.Accordion).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//show: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Accordion) + // Result: + // * Go(fyne.size) + "Go(*widget.Accordion)//size": { + Doc: "(*widget.Accordion).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//size: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Accordion) + // Result: + // * Go(fyne.theme) + "Go(*widget.Accordion)//theme": { + Doc: "(*widget.Accordion).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//theme: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Accordion) + // Result: + // * bool + "Go(*widget.Accordion)//visible": { + Doc: "(*widget.Accordion).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Accordion + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Accordion); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//visible: arg 1: " + "expected native of type *widget.Accordion, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Accordion)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * detail - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.AccordionItem)//detail!": { + Doc: "Set *widget.AccordionItem Detail value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.AccordionItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.AccordionItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//detail!: arg 1: " + "expected native of type *widget.AccordionItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//detail!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//detail!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//detail!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//detail!: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//detail!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//detail!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Detail = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.AccordionItem)//detail?": { + Doc: "Get *widget.AccordionItem Detail value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.AccordionItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.AccordionItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//detail?: arg 1: " + "expected native of type *widget.AccordionItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//detail?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//detail?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Detail, "Go(fyne.CanvasObject)") + return resObj + }, + }, + // Args: + // * open - bool + // Result: + // * bool + "Go(*widget.AccordionItem)//open!": { + Doc: "Set *widget.AccordionItem Open value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.AccordionItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.AccordionItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//open!: arg 1: " + "expected native of type *widget.AccordionItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//open!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//open!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//open!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Open = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.AccordionItem)//open?": { + Doc: "Get *widget.AccordionItem Open value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.AccordionItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.AccordionItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//open?: arg 1: " + "expected native of type *widget.AccordionItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//open?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//open?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Open)) + return resObj + }, + }, + // Args: + // * title - string + // Result: + // * string + "Go(*widget.AccordionItem)//title!": { + Doc: "Set *widget.AccordionItem Title value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.AccordionItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.AccordionItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//title!: arg 1: " + "expected native of type *widget.AccordionItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//title!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//title!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//title!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Title = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.AccordionItem)//title?": { + Doc: "Get *widget.AccordionItem Title value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.AccordionItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.AccordionItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//title?: arg 1: " + "expected native of type *widget.AccordionItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//title?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.AccordionItem)//title?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Title) + return resObj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Activity)//base-widget!": { + Doc: "Set *widget.Activity BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//base-widget!: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Activity)//base-widget?": { + Doc: "Get *widget.Activity BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//base-widget?: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Activity) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Activity)//create-renderer": { + Doc: "(*widget.Activity).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//create-renderer: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Activity) + // * wid - Go(fyne.Widget) + "Go(*widget.Activity)//extend-base-widget": { + Doc: "(*widget.Activity).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//extend-base-widget: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Activity)//hidden!": { + Doc: "Set *widget.Activity Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//hidden!: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Activity)//hidden?": { + Doc: "Get *widget.Activity Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//hidden?: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Activity) + "Go(*widget.Activity)//hide": { + Doc: "(*widget.Activity).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//hide: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Activity) + // Result: + // * Go(fyne.Size) + "Go(*widget.Activity)//min-size": { + Doc: "(*widget.Activity).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//min-size: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Activity) + // * pos - Go(fyne.Position) + "Go(*widget.Activity)//move": { + Doc: "(*widget.Activity).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//move: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Activity) + // Result: + // * Go(fyne.position) + "Go(*widget.Activity)//position": { + Doc: "(*widget.Activity).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//position: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Activity) + "Go(*widget.Activity)//refresh": { + Doc: "(*widget.Activity).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//refresh: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Activity) + // * size - Go(fyne.Size) + "Go(*widget.Activity)//resize": { + Doc: "(*widget.Activity).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//resize: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Activity) + "Go(*widget.Activity)//show": { + Doc: "(*widget.Activity).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//show: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Activity) + // Result: + // * Go(fyne.size) + "Go(*widget.Activity)//size": { + Doc: "(*widget.Activity).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//size: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // start the activity indicator animation + // + // Args: + // * recv - Go(*widget.Activity) + "Go(*widget.Activity)//start": { + Doc: "(*widget.Activity).Start", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//start: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//start: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//start: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Start() + return arg0 + }, + }, + // stop the activity indicator animation + // + // Args: + // * recv - Go(*widget.Activity) + "Go(*widget.Activity)//stop": { + Doc: "(*widget.Activity).Stop", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//stop: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//stop: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//stop: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Stop() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Activity) + // Result: + // * Go(fyne.theme) + "Go(*widget.Activity)//theme": { + Doc: "(*widget.Activity).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//theme: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Activity) + // Result: + // * bool + "Go(*widget.Activity)//visible": { + Doc: "(*widget.Activity).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Activity + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Activity); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//visible: arg 1: " + "expected native of type *widget.Activity, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Activity)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // extend-base-widget is used by an extending widget to make use of BaseWidget functionality. + // + // Args: + // * recv - Go(*widget.BaseWidget) + // * wid - Go(fyne.Widget) + "Go(*widget.BaseWidget)//extend-base-widget": { + Doc: "(*widget.BaseWidget).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.BaseWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//extend-base-widget: arg 1: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.BaseWidget)//hidden!": { + Doc: "Set *widget.BaseWidget Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.BaseWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//hidden!: arg 1: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.BaseWidget)//hidden?": { + Doc: "Get *widget.BaseWidget Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.BaseWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//hidden?: arg 1: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // hide this widget so it is no longer visible + // + // Args: + // * recv - Go(*widget.BaseWidget) + "Go(*widget.BaseWidget)//hide": { + Doc: "(*widget.BaseWidget).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.BaseWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//hide: arg 1: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size for the widget - it should never be resized below this value. + // + // Args: + // * recv - Go(*widget.BaseWidget) + // Result: + // * Go(fyne.Size) + "Go(*widget.BaseWidget)//min-size": { + Doc: "(*widget.BaseWidget).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.BaseWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//min-size: arg 1: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // move the widget to a new position, relative to its parent. + // Note this should not be used if the widget is being managed by a Layout within a Container. + // + // Args: + // * recv - Go(*widget.BaseWidget) + // * pos - Go(fyne.Position) + "Go(*widget.BaseWidget)//move": { + Doc: "(*widget.BaseWidget).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.BaseWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//move: arg 1: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // position gets the current position of this widget, relative to its parent. + // + // Args: + // * recv - Go(*widget.BaseWidget) + // Result: + // * Go(fyne.position) + "Go(*widget.BaseWidget)//position": { + Doc: "(*widget.BaseWidget).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.BaseWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//position: arg 1: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // refresh causes this widget to be redrawn in it's current state + // + // Args: + // * recv - Go(*widget.BaseWidget) + "Go(*widget.BaseWidget)//refresh": { + Doc: "(*widget.BaseWidget).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.BaseWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//refresh: arg 1: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize sets a new size for a widget. + // Note this should not be used if the widget is being managed by a Layout within a Container. + // + // Args: + // * recv - Go(*widget.BaseWidget) + // * size - Go(fyne.Size) + "Go(*widget.BaseWidget)//resize": { + Doc: "(*widget.BaseWidget).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.BaseWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//resize: arg 1: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // show this widget so it becomes visible + // + // Args: + // * recv - Go(*widget.BaseWidget) + "Go(*widget.BaseWidget)//show": { + Doc: "(*widget.BaseWidget).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.BaseWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//show: arg 1: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // size gets the current size of this widget. + // + // Args: + // * recv - Go(*widget.BaseWidget) + // Result: + // * Go(fyne.size) + "Go(*widget.BaseWidget)//size": { + Doc: "(*widget.BaseWidget).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.BaseWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//size: arg 1: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // theme returns a cached theme instance for this widget (or its extending widget). + // This will be the app theme in most cases, or a widget specific theme if it is inside a themeOverride container. + // + // Since: 2.5 + // + // Args: + // * recv - Go(*widget.BaseWidget) + // Result: + // * Go(fyne.theme) + "Go(*widget.BaseWidget)//theme": { + Doc: "(*widget.BaseWidget).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.BaseWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//theme: arg 1: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // visible returns whether or not this widget should be visible. + // Note that this may not mean it is currently visible if a parent has been hidden. + // + // Args: + // * recv - Go(*widget.BaseWidget) + // Result: + // * bool + "Go(*widget.BaseWidget)//visible": { + Doc: "(*widget.BaseWidget).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.BaseWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//visible: arg 1: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.BaseWidget)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * alignment - integer + // Result: + // * integer + "Go(*widget.Button)//alignment!": { + Doc: "Set *widget.Button Alignment value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//alignment!: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//alignment!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//alignment!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal widget.ButtonAlign + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.ButtonAlign + if natOk { + natVal, natValOk = nat.Value.(widget.ButtonAlign) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//alignment!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = widget.ButtonAlign(u) + } + } + self.Alignment = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Button)//alignment?": { + Doc: "Get *widget.Button Alignment value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//alignment?: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//alignment?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//alignment?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Alignment))) + return resObj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Button)//base-widget!": { + Doc: "Set *widget.Button BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//base-widget!: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Button)//base-widget?": { + Doc: "Get *widget.Button BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//base-widget?: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.Button) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Button)//create-renderer": { + Doc: "(*widget.Button).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//create-renderer: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // cursor returns the cursor type of this widget + // + // Args: + // * recv - Go(*widget.Button) + // Result: + // * Go(desktop.cursor) + "Go(*widget.Button)//cursor": { + Doc: "(*widget.Button).Cursor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//cursor: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//cursor: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//cursor: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Cursor() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(desktop.Cursor)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Button) + "Go(*widget.Button)//disable": { + Doc: "(*widget.Button).Disable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//disable: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//disable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//disable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Disable() + return arg0 + }, + }, + // Args: + // * disableable-widget - Go(widget.DisableableWidget) + // Result: + // * Go(widget.DisableableWidget) + "Go(*widget.Button)//disableable-widget!": { + Doc: "Set *widget.Button DisableableWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//disableable-widget!: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//disableable-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//disableable-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.DisableableWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//disableable-widget!: arg 2: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//disableable-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//disableable-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.DisableableWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.DisableableWidget) + "Go(*widget.Button)//disableable-widget?": { + Doc: "Get *widget.Button DisableableWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//disableable-widget?: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//disableable-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//disableable-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.DisableableWidget, "Go(*widget.DisableableWidget)") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Button) + // Result: + // * bool + "Go(*widget.Button)//disabled": { + Doc: "(*widget.Button).Disabled", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//disabled: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//disabled: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//disabled: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Disabled() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Button) + "Go(*widget.Button)//enable": { + Doc: "(*widget.Button).Enable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//enable: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//enable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//enable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Enable() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Button) + // * wid - Go(fyne.Widget) + "Go(*widget.Button)//extend-base-widget": { + Doc: "(*widget.Button).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//extend-base-widget: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // focus-gained is a hook called by the focus handling logic after this object gained the focus. + // + // Args: + // * recv - Go(*widget.Button) + "Go(*widget.Button)//focus-gained": { + Doc: "(*widget.Button).FocusGained", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//focus-gained: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//focus-gained: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//focus-gained: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusGained() + return arg0 + }, + }, + // focus-lost is a hook called by the focus handling logic after this object lost the focus. + // + // Args: + // * recv - Go(*widget.Button) + "Go(*widget.Button)//focus-lost": { + Doc: "(*widget.Button).FocusLost", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//focus-lost: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//focus-lost: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//focus-lost: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusLost() + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Button)//hidden!": { + Doc: "Set *widget.Button Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//hidden!: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Button)//hidden?": { + Doc: "Get *widget.Button Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//hidden?: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Button) + "Go(*widget.Button)//hide": { + Doc: "(*widget.Button).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//hide: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * icon - Go(fyne.Resource) + // Result: + // * Go(fyne.Resource) + "Go(*widget.Button)//icon!": { + Doc: "Set *widget.Button Icon value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon!: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon!: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Icon = newVal + return arg0 + }, + }, + // Args: + // * icon-placement - integer + // Result: + // * integer + "Go(*widget.Button)//icon-placement!": { + Doc: "Set *widget.Button IconPlacement value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon-placement!: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon-placement!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon-placement!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal widget.ButtonIconPlacement + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.ButtonIconPlacement + if natOk { + natVal, natValOk = nat.Value.(widget.ButtonIconPlacement) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon-placement!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = widget.ButtonIconPlacement(u) + } + } + self.IconPlacement = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Button)//icon-placement?": { + Doc: "Get *widget.Button IconPlacement value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon-placement?: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon-placement?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon-placement?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.IconPlacement))) + return resObj + }, + }, + // Result: + // * Go(fyne.Resource) + "Go(*widget.Button)//icon?": { + Doc: "Get *widget.Button Icon value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon?: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//icon?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Icon, "Go(fyne.Resource)") + return resObj + }, + }, + // Args: + // * importance - integer + // Result: + // * integer + "Go(*widget.Button)//importance!": { + Doc: "Set *widget.Button Importance value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//importance!: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//importance!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//importance!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal widget.Importance + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.Importance + if natOk { + natVal, natValOk = nat.Value.(widget.Importance) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//importance!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = widget.Importance(u) + } + } + self.Importance = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Button)//importance?": { + Doc: "Get *widget.Button Importance value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//importance?: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//importance?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//importance?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Importance))) + return resObj + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Args: + // * recv - Go(*widget.Button) + // Result: + // * Go(fyne.Size) + "Go(*widget.Button)//min-size": { + Doc: "(*widget.Button).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//min-size: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // mouse-in is called when a desktop pointer enters the widget + // + // Args: + // * recv - Go(*widget.Button) + // * 1 - Go(*desktop.MouseEvent) + "Go(*widget.Button)//mouse-in": { + Doc: "(*widget.Button).MouseIn", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//mouse-in: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//mouse-in: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//mouse-in: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//mouse-in: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//mouse-in: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//mouse-in: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseIn(arg1Val) + return arg0 + }, + }, + // mouse-moved is called when a desktop pointer hovers over the widget + // + // Args: + // * recv - Go(*widget.Button) + // * 1 - Go(*desktop.MouseEvent) + "Go(*widget.Button)//mouse-moved": { + Doc: "(*widget.Button).MouseMoved", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//mouse-moved: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//mouse-moved: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//mouse-moved: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//mouse-moved: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//mouse-moved: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//mouse-moved: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseMoved(arg1Val) + return arg0 + }, + }, + // mouse-out is called when a desktop pointer exits the widget + // + // Args: + // * recv - Go(*widget.Button) + "Go(*widget.Button)//mouse-out": { + Doc: "(*widget.Button).MouseOut", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//mouse-out: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//mouse-out: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//mouse-out: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseOut() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Button) + // * pos - Go(fyne.Position) + "Go(*widget.Button)//move": { + Doc: "(*widget.Button).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//move: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-tapped - fn { } + // Result: + // * fn { } + "Go(*widget.Button)//on-tapped!": { + Doc: "Set *widget.Button OnTapped value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//on-tapped!: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//on-tapped!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//on-tapped!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//on-tapped!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//on-tapped!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//on-tapped!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnTapped = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*widget.Button)//on-tapped?": { + Doc: "Get *widget.Button OnTapped value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//on-tapped?: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//on-tapped?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//on-tapped?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.OnTapped() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Button) + // Result: + // * Go(fyne.position) + "Go(*widget.Button)//position": { + Doc: "(*widget.Button).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//position: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Button) + "Go(*widget.Button)//refresh": { + Doc: "(*widget.Button).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//refresh: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Button) + // * size - Go(fyne.Size) + "Go(*widget.Button)//resize": { + Doc: "(*widget.Button).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//resize: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // set-icon updates the icon on a label - pass nil to hide an icon + // + // Args: + // * recv - Go(*widget.Button) + // * icon - Go(fyne.Resource) + "Go(*widget.Button)//set-icon": { + Doc: "(*widget.Button).SetIcon", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//set-icon: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//set-icon: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//set-icon: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//set-icon: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//set-icon: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//set-icon: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//set-icon: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetIcon(arg1Val) + return arg0 + }, + }, + // set-text allows the button label to be changed + // + // Args: + // * recv - Go(*widget.Button) + // * text - string + "Go(*widget.Button)//set-text": { + Doc: "(*widget.Button).SetText", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//set-text: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//set-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//set-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//set-text: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetText(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Button) + "Go(*widget.Button)//show": { + Doc: "(*widget.Button).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//show: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Button) + // Result: + // * Go(fyne.size) + "Go(*widget.Button)//size": { + Doc: "(*widget.Button).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//size: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // tapped is called when a pointer tapped event is captured and triggers any tap handler + // + // Args: + // * recv - Go(*widget.Button) + // * 1 - Go(*fyne.PointEvent) + "Go(*widget.Button)//tapped": { + Doc: "(*widget.Button).Tapped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//tapped: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//tapped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//tapped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//tapped: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//tapped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//tapped: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Tapped(arg1Val) + return arg0 + }, + }, + // Args: + // * text - string + // Result: + // * string + "Go(*widget.Button)//text!": { + Doc: "Set *widget.Button Text value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//text!: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//text!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//text!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//text!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Text = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.Button)//text?": { + Doc: "Get *widget.Button Text value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//text?: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//text?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//text?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Text) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Button) + // Result: + // * Go(fyne.theme) + "Go(*widget.Button)//theme": { + Doc: "(*widget.Button).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//theme: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // typed-key is a hook called by the input handling logic on key events if this object is focused. + // + // Args: + // * recv - Go(*widget.Button) + // * ev - Go(*fyne.KeyEvent) + "Go(*widget.Button)//typed-key": { + Doc: "(*widget.Button).TypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//typed-key: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//typed-key: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//typed-key: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedKey(arg1Val) + return arg0 + }, + }, + // typed-rune is a hook called by the input handling logic on text input events if this object is focused. + // + // Args: + // * recv - Go(*widget.Button) + // * 1 - Go(rune) + "Go(*widget.Button)//typed-rune": { + Doc: "(*widget.Button).TypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//typed-rune: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//typed-rune: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//typed-rune: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedRune(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Button) + // Result: + // * bool + "Go(*widget.Button)//visible": { + Doc: "(*widget.Button).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Button + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Button); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//visible: arg 1: " + "expected native of type *widget.Button, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Button)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Card)//base-widget!": { + Doc: "Set *widget.Card BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//base-widget!: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Card)//base-widget?": { + Doc: "Get *widget.Card BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//base-widget?: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // Args: + // * content - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.Card)//content!": { + Doc: "Set *widget.Card Content value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//content!: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//content!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//content!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//content!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//content!: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//content!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//content!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Content = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.Card)//content?": { + Doc: "Get *widget.Card Content value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//content?: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//content?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//content?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Content, "Go(fyne.CanvasObject)") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.Card) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Card)//create-renderer": { + Doc: "(*widget.Card).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//create-renderer: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Card) + // * wid - Go(fyne.Widget) + "Go(*widget.Card)//extend-base-widget": { + Doc: "(*widget.Card).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//extend-base-widget: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Card)//hidden!": { + Doc: "Set *widget.Card Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//hidden!: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Card)//hidden?": { + Doc: "Get *widget.Card Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//hidden?: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Card) + "Go(*widget.Card)//hide": { + Doc: "(*widget.Card).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//hide: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * image - Go(*canvas.Image) + // Result: + // * Go(*canvas.Image) + "Go(*widget.Card)//image!": { + Doc: "Set *widget.Card Image value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//image!: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//image!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//image!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *canvas.Image + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//image!: arg 2: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//image!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//image!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Image = newVal + return arg0 + }, + }, + // Result: + // * Go(*canvas.Image) + "Go(*widget.Card)//image?": { + Doc: "Get *widget.Card Image value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//image?: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//image?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//image?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.Image, "Go(*canvas.Image)") + return resObj + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Args: + // * recv - Go(*widget.Card) + // Result: + // * Go(fyne.Size) + "Go(*widget.Card)//min-size": { + Doc: "(*widget.Card).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//min-size: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Card) + // * pos - Go(fyne.Position) + "Go(*widget.Card)//move": { + Doc: "(*widget.Card).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//move: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Card) + // Result: + // * Go(fyne.position) + "Go(*widget.Card)//position": { + Doc: "(*widget.Card).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//position: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Card) + "Go(*widget.Card)//refresh": { + Doc: "(*widget.Card).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//refresh: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Card) + // * size - Go(fyne.Size) + "Go(*widget.Card)//resize": { + Doc: "(*widget.Card).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//resize: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // set-content changes the body of this card to have the specified content. + // + // Args: + // * recv - Go(*widget.Card) + // * obj - Go(fyne.CanvasObject) + "Go(*widget.Card)//set-content": { + Doc: "(*widget.Card).SetContent", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-content: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-content: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-content: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-content: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-content: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetContent(arg1Val) + return arg0 + }, + }, + // set-image changes the image displayed above the title for this card. + // + // Args: + // * recv - Go(*widget.Card) + // * img - Go(*canvas.Image) + "Go(*widget.Card)//set-image": { + Doc: "(*widget.Card).SetImage", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-image: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-image: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-image: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *canvas.Image + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*canvas.Image); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-image: arg 2: " + "expected native of type *canvas.Image, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-image: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-image: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetImage(arg1Val) + return arg0 + }, + }, + // set-sub-title updates the secondary title for this card. + // + // Args: + // * recv - Go(*widget.Card) + // * text - string + "Go(*widget.Card)//set-sub-title": { + Doc: "(*widget.Card).SetSubTitle", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-sub-title: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-sub-title: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-sub-title: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-sub-title: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetSubTitle(arg1Val) + return arg0 + }, + }, + // set-title updates the main title for this card. + // + // Args: + // * recv - Go(*widget.Card) + // * text - string + "Go(*widget.Card)//set-title": { + Doc: "(*widget.Card).SetTitle", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-title: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-title: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-title: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//set-title: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetTitle(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Card) + "Go(*widget.Card)//show": { + Doc: "(*widget.Card).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//show: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Card) + // Result: + // * Go(fyne.size) + "Go(*widget.Card)//size": { + Doc: "(*widget.Card).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//size: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * subtitle - string + // Result: + // * string + "Go(*widget.Card)//subtitle!": { + Doc: "Set *widget.Card Subtitle value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//subtitle!: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//subtitle!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//subtitle!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//subtitle!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Subtitle = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.Card)//subtitle?": { + Doc: "Get *widget.Card Subtitle value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//subtitle?: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//subtitle?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//subtitle?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Subtitle) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Card) + // Result: + // * Go(fyne.theme) + "Go(*widget.Card)//theme": { + Doc: "(*widget.Card).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//theme: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * title - string + // Result: + // * string + "Go(*widget.Card)//title!": { + Doc: "Set *widget.Card Title value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//title!: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//title!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//title!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//title!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Title = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.Card)//title?": { + Doc: "Get *widget.Card Title value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//title?: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//title?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//title?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Title) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Card) + // Result: + // * bool + "Go(*widget.Card)//visible": { + Doc: "(*widget.Card).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Card + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Card); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//visible: arg 1: " + "expected native of type *widget.Card, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Card)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Check)//base-widget!": { + Doc: "Set *widget.Check BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//base-widget!: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Check)//base-widget?": { + Doc: "Get *widget.Check BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//base-widget?: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // bind connects the specified data source to this Check. + // The current value will be displayed and any changes in the data will cause the widget to update. + // User interactions with this Check will set the value into the data source. + // + // Since: 2.0 + // + // Args: + // * recv - Go(*widget.Check) + // * data - Go(binding.Bool) + "Go(*widget.Check)//bind": { + Doc: "(*widget.Check).Bind", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//bind: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//bind: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//bind: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.Bool + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_Bool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//bind: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Bool); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//bind: arg 2: " + "expected native of type binding.Bool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//bind: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//bind: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Bind(arg1Val) + return arg0 + }, + }, + // Args: + // * checked - bool + // Result: + // * bool + "Go(*widget.Check)//checked!": { + Doc: "Set *widget.Check Checked value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//checked!: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//checked!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//checked!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//checked!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Checked = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Check)//checked?": { + Doc: "Get *widget.Check Checked value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//checked?: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//checked?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//checked?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Checked)) + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.Check) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Check)//create-renderer": { + Doc: "(*widget.Check).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//create-renderer: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Check) + "Go(*widget.Check)//disable": { + Doc: "(*widget.Check).Disable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//disable: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//disable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//disable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Disable() + return arg0 + }, + }, + // Args: + // * disableable-widget - Go(widget.DisableableWidget) + // Result: + // * Go(widget.DisableableWidget) + "Go(*widget.Check)//disableable-widget!": { + Doc: "Set *widget.Check DisableableWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//disableable-widget!: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//disableable-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//disableable-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.DisableableWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//disableable-widget!: arg 2: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//disableable-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//disableable-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.DisableableWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.DisableableWidget) + "Go(*widget.Check)//disableable-widget?": { + Doc: "Get *widget.Check DisableableWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//disableable-widget?: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//disableable-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//disableable-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.DisableableWidget, "Go(*widget.DisableableWidget)") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Check) + // Result: + // * bool + "Go(*widget.Check)//disabled": { + Doc: "(*widget.Check).Disabled", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//disabled: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//disabled: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//disabled: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Disabled() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Check) + "Go(*widget.Check)//enable": { + Doc: "(*widget.Check).Enable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//enable: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//enable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//enable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Enable() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Check) + // * wid - Go(fyne.Widget) + "Go(*widget.Check)//extend-base-widget": { + Doc: "(*widget.Check).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//extend-base-widget: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // focus-gained is called when the Check has been given focus. + // + // Args: + // * recv - Go(*widget.Check) + "Go(*widget.Check)//focus-gained": { + Doc: "(*widget.Check).FocusGained", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//focus-gained: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//focus-gained: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//focus-gained: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusGained() + return arg0 + }, + }, + // focus-lost is called when the Check has had focus removed. + // + // Args: + // * recv - Go(*widget.Check) + "Go(*widget.Check)//focus-lost": { + Doc: "(*widget.Check).FocusLost", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//focus-lost: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//focus-lost: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//focus-lost: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusLost() + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Check)//hidden!": { + Doc: "Set *widget.Check Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//hidden!: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Check)//hidden?": { + Doc: "Get *widget.Check Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//hidden?: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // hide this widget, if it was previously visible + // + // Args: + // * recv - Go(*widget.Check) + "Go(*widget.Check)//hide": { + Doc: "(*widget.Check).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//hide: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Args: + // * recv - Go(*widget.Check) + // Result: + // * Go(fyne.Size) + "Go(*widget.Check)//min-size": { + Doc: "(*widget.Check).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//min-size: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // mouse-in is called when a desktop pointer enters the widget + // + // Args: + // * recv - Go(*widget.Check) + // * me - Go(*desktop.MouseEvent) + "Go(*widget.Check)//mouse-in": { + Doc: "(*widget.Check).MouseIn", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//mouse-in: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//mouse-in: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//mouse-in: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//mouse-in: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//mouse-in: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//mouse-in: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseIn(arg1Val) + return arg0 + }, + }, + // mouse-moved is called when a desktop pointer hovers over the widget + // + // Args: + // * recv - Go(*widget.Check) + // * me - Go(*desktop.MouseEvent) + "Go(*widget.Check)//mouse-moved": { + Doc: "(*widget.Check).MouseMoved", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//mouse-moved: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//mouse-moved: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//mouse-moved: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//mouse-moved: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//mouse-moved: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//mouse-moved: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseMoved(arg1Val) + return arg0 + }, + }, + // mouse-out is called when a desktop pointer exits the widget + // + // Args: + // * recv - Go(*widget.Check) + "Go(*widget.Check)//mouse-out": { + Doc: "(*widget.Check).MouseOut", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//mouse-out: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//mouse-out: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//mouse-out: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseOut() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Check) + // * pos - Go(fyne.Position) + "Go(*widget.Check)//move": { + Doc: "(*widget.Check).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//move: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-changed - fn { bool } + // Result: + // * fn { bool } + "Go(*widget.Check)//on-changed!": { + Doc: "Set *widget.Check OnChanged value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//on-changed!: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//on-changed!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//on-changed!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(bool) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//on-changed!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 bool) { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//on-changed!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//on-changed!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnChanged = newVal + return arg0 + }, + }, + // Result: + // * fn { bool } + "Go(*widget.Check)//on-changed?": { + Doc: "Get *widget.Check OnChanged value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//on-changed?: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//on-changed?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//on-changed?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val bool + if vc, ok := arg0.(env.Integer); ok { + arg0Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//on-changed?: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + self.OnChanged(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Check) + // Result: + // * Go(fyne.position) + "Go(*widget.Check)//position": { + Doc: "(*widget.Check).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//position: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Check) + "Go(*widget.Check)//refresh": { + Doc: "(*widget.Check).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//refresh: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Check) + // * size - Go(fyne.Size) + "Go(*widget.Check)//resize": { + Doc: "(*widget.Check).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//resize: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // set-checked sets the checked state and refreshes widget + // + // Args: + // * recv - Go(*widget.Check) + // * checked - bool + "Go(*widget.Check)//set-checked": { + Doc: "(*widget.Check).SetChecked", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//set-checked: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//set-checked: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//set-checked: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//set-checked: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetChecked(arg1Val) + return arg0 + }, + }, + // set-text sets the text of the Check + // + // Since: 2.4 + // + // Args: + // * recv - Go(*widget.Check) + // * text - string + "Go(*widget.Check)//set-text": { + Doc: "(*widget.Check).SetText", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//set-text: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//set-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//set-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//set-text: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetText(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Check) + "Go(*widget.Check)//show": { + Doc: "(*widget.Check).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//show: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Check) + // Result: + // * Go(fyne.size) + "Go(*widget.Check)//size": { + Doc: "(*widget.Check).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//size: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // tapped is called when a pointer tapped event is captured and triggers any change handler + // + // Args: + // * recv - Go(*widget.Check) + // * pe - Go(*fyne.PointEvent) + "Go(*widget.Check)//tapped": { + Doc: "(*widget.Check).Tapped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//tapped: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//tapped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//tapped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//tapped: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//tapped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//tapped: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Tapped(arg1Val) + return arg0 + }, + }, + // Args: + // * text - string + // Result: + // * string + "Go(*widget.Check)//text!": { + Doc: "Set *widget.Check Text value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//text!: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//text!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//text!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//text!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Text = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.Check)//text?": { + Doc: "Get *widget.Check Text value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//text?: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//text?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//text?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Text) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Check) + // Result: + // * Go(fyne.theme) + "Go(*widget.Check)//theme": { + Doc: "(*widget.Check).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//theme: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // typed-key receives key input events when the Check is focused. + // + // Args: + // * recv - Go(*widget.Check) + // * key - Go(*fyne.KeyEvent) + "Go(*widget.Check)//typed-key": { + Doc: "(*widget.Check).TypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//typed-key: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//typed-key: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//typed-key: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedKey(arg1Val) + return arg0 + }, + }, + // typed-rune receives text input events when the Check is focused. + // + // Args: + // * recv - Go(*widget.Check) + // * r - Go(rune) + "Go(*widget.Check)//typed-rune": { + Doc: "(*widget.Check).TypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//typed-rune: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//typed-rune: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//typed-rune: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedRune(arg1Val) + return arg0 + }, + }, + // unbind disconnects any configured data source from this Check. + // The current value will remain at the last value of the data source. + // + // Since: 2.0 + // + // Args: + // * recv - Go(*widget.Check) + "Go(*widget.Check)//unbind": { + Doc: "(*widget.Check).Unbind", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//unbind: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//unbind: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//unbind: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unbind() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Check) + // Result: + // * bool + "Go(*widget.Check)//visible": { + Doc: "(*widget.Check).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Check + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Check); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//visible: arg 1: " + "expected native of type *widget.Check, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Check)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // append adds a new option to the end of a CheckGroup widget. + // + // Args: + // * recv - Go(*widget.CheckGroup) + // * option - string + "Go(*widget.CheckGroup)//append": { + Doc: "(*widget.CheckGroup).Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//append: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.Append(arg1Val) + return arg0 + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.CheckGroup)//base-widget!": { + Doc: "Set *widget.CheckGroup BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//base-widget!: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.CheckGroup)//base-widget?": { + Doc: "Get *widget.CheckGroup BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//base-widget?: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.CheckGroup) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.CheckGroup)//create-renderer": { + Doc: "(*widget.CheckGroup).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//create-renderer: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.CheckGroup) + "Go(*widget.CheckGroup)//disable": { + Doc: "(*widget.CheckGroup).Disable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//disable: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//disable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//disable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Disable() + return arg0 + }, + }, + // Args: + // * disableable-widget - Go(widget.DisableableWidget) + // Result: + // * Go(widget.DisableableWidget) + "Go(*widget.CheckGroup)//disableable-widget!": { + Doc: "Set *widget.CheckGroup DisableableWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//disableable-widget!: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//disableable-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//disableable-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.DisableableWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//disableable-widget!: arg 2: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//disableable-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//disableable-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.DisableableWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.DisableableWidget) + "Go(*widget.CheckGroup)//disableable-widget?": { + Doc: "Get *widget.CheckGroup DisableableWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//disableable-widget?: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//disableable-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//disableable-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.DisableableWidget, "Go(*widget.DisableableWidget)") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.CheckGroup) + // Result: + // * bool + "Go(*widget.CheckGroup)//disabled": { + Doc: "(*widget.CheckGroup).Disabled", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//disabled: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//disabled: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//disabled: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Disabled() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.CheckGroup) + "Go(*widget.CheckGroup)//enable": { + Doc: "(*widget.CheckGroup).Enable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//enable: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//enable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//enable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Enable() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.CheckGroup) + // * wid - Go(fyne.Widget) + "Go(*widget.CheckGroup)//extend-base-widget": { + Doc: "(*widget.CheckGroup).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//extend-base-widget: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.CheckGroup)//hidden!": { + Doc: "Set *widget.CheckGroup Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//hidden!: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.CheckGroup)//hidden?": { + Doc: "Get *widget.CheckGroup Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//hidden?: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.CheckGroup) + "Go(*widget.CheckGroup)//hide": { + Doc: "(*widget.CheckGroup).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//hide: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * horizontal - bool + // Result: + // * bool + "Go(*widget.CheckGroup)//horizontal!": { + Doc: "Set *widget.CheckGroup Horizontal value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//horizontal!: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//horizontal!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//horizontal!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//horizontal!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Horizontal = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.CheckGroup)//horizontal?": { + Doc: "Get *widget.CheckGroup Horizontal value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//horizontal?: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//horizontal?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//horizontal?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Horizontal)) + return resObj + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Args: + // * recv - Go(*widget.CheckGroup) + // Result: + // * Go(fyne.Size) + "Go(*widget.CheckGroup)//min-size": { + Doc: "(*widget.CheckGroup).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//min-size: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.CheckGroup) + // * pos - Go(fyne.Position) + "Go(*widget.CheckGroup)//move": { + Doc: "(*widget.CheckGroup).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//move: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-changed - fn { block[string] } + // Result: + // * fn { block[string] } + "Go(*widget.CheckGroup)//on-changed!": { + Doc: "Set *widget.CheckGroup OnChanged value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//on-changed!: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//on-changed!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//on-changed!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func([]string) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//on-changed!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 []string) { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewString(it) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//on-changed!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//on-changed!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnChanged = newVal + return arg0 + }, + }, + // Result: + // * fn { block[string] } + "Go(*widget.CheckGroup)//on-changed?": { + Doc: "Get *widget.CheckGroup OnChanged value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//on-changed?: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//on-changed?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//on-changed?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []string + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//on-changed?: arg 1: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//on-changed?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//on-changed?: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.OnChanged(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * options - block[string] + // Result: + // * block[string] + "Go(*widget.CheckGroup)//options!": { + Doc: "Set *widget.CheckGroup Options value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//options!: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//options!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//options!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []string + switch v := arg1.(type) { + case env.Block: + newVal = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//options!: arg 2: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//options!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//options!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Options = newVal + return arg0 + }, + }, + // Result: + // * block[string] + "Go(*widget.CheckGroup)//options?": { + Doc: "Get *widget.CheckGroup Options value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//options?: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//options?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//options?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Options)) + for i, it := range self.Options { + items[i] = *env.NewString(it) + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // Args: + // * recv - Go(*widget.CheckGroup) + // Result: + // * Go(fyne.position) + "Go(*widget.CheckGroup)//position": { + Doc: "(*widget.CheckGroup).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//position: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // refresh causes this widget to be redrawn in it's current state. + // + // Implements: fyne.CanvasObject + // + // Args: + // * recv - Go(*widget.CheckGroup) + "Go(*widget.CheckGroup)//refresh": { + Doc: "(*widget.CheckGroup).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//refresh: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // remove removes the first occurrence of the specified option found from a CheckGroup widget. + // Return true if an option was removed. + // + // Since: 2.3 + // + // Args: + // * recv - Go(*widget.CheckGroup) + // * option - string + // Result: + // * bool + "Go(*widget.CheckGroup)//remove": { + Doc: "(*widget.CheckGroup).Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//remove: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.Remove(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * required - bool + // Result: + // * bool + "Go(*widget.CheckGroup)//required!": { + Doc: "Set *widget.CheckGroup Required value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//required!: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//required!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//required!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//required!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Required = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.CheckGroup)//required?": { + Doc: "Get *widget.CheckGroup Required value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//required?: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//required?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//required?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Required)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.CheckGroup) + // * size - Go(fyne.Size) + "Go(*widget.CheckGroup)//resize": { + Doc: "(*widget.CheckGroup).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//resize: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * selected - block[string] + // Result: + // * block[string] + "Go(*widget.CheckGroup)//selected!": { + Doc: "Set *widget.CheckGroup Selected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//selected!: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//selected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//selected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []string + switch v := arg1.(type) { + case env.Block: + newVal = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//selected!: arg 2: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//selected!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//selected!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Selected = newVal + return arg0 + }, + }, + // Result: + // * block[string] + "Go(*widget.CheckGroup)//selected?": { + Doc: "Get *widget.CheckGroup Selected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//selected?: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//selected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//selected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Selected)) + for i, it := range self.Selected { + items[i] = *env.NewString(it) + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // set-selected sets the checked options, it can be used to set a default option. + // + // Args: + // * recv - Go(*widget.CheckGroup) + // * options - block[string] + "Go(*widget.CheckGroup)//set-selected": { + Doc: "(*widget.CheckGroup).SetSelected", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//set-selected: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//set-selected: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//set-selected: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []string + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//set-selected: arg 2: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//set-selected: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//set-selected: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetSelected(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.CheckGroup) + "Go(*widget.CheckGroup)//show": { + Doc: "(*widget.CheckGroup).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//show: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.CheckGroup) + // Result: + // * Go(fyne.size) + "Go(*widget.CheckGroup)//size": { + Doc: "(*widget.CheckGroup).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//size: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.CheckGroup) + // Result: + // * Go(fyne.theme) + "Go(*widget.CheckGroup)//theme": { + Doc: "(*widget.CheckGroup).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//theme: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.CheckGroup) + // Result: + // * bool + "Go(*widget.CheckGroup)//visible": { + Doc: "(*widget.CheckGroup).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CheckGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CheckGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//visible: arg 1: " + "expected native of type *widget.CheckGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CheckGroup)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // background-color is the color a cell should use for the background. + // + // Args: + // * recv - Go(*widget.CustomTextGridStyle) + // Result: + // * Go(color.Color) + "Go(*widget.CustomTextGridStyle)//background-color": { + Doc: "(*widget.CustomTextGridStyle).BackgroundColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CustomTextGridStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CustomTextGridStyle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//background-color: arg 1: " + "expected native of type *widget.CustomTextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//background-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//background-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.BackgroundColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * bg-color - Go(color.Color) + // Result: + // * Go(color.Color) + "Go(*widget.CustomTextGridStyle)//bg-color!": { + Doc: "Set *widget.CustomTextGridStyle BGColor value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CustomTextGridStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CustomTextGridStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//bg-color!: arg 1: " + "expected native of type *widget.CustomTextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//bg-color!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//bg-color!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//bg-color!: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//bg-color!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BGColor = newVal + return arg0 + }, + }, + // Result: + // * Go(color.Color) + "Go(*widget.CustomTextGridStyle)//bg-color?": { + Doc: "Get *widget.CustomTextGridStyle BGColor value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CustomTextGridStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CustomTextGridStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//bg-color?: arg 1: " + "expected native of type *widget.CustomTextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//bg-color?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//bg-color?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.BGColor, "Go(color.Color)") + return resObj + }, + }, + // Args: + // * fg-color - Go(color.Color) + // Result: + // * Go(color.Color) + "Go(*widget.CustomTextGridStyle)//fg-color!": { + Doc: "Set *widget.CustomTextGridStyle FGColor value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CustomTextGridStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CustomTextGridStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//fg-color!: arg 1: " + "expected native of type *widget.CustomTextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//fg-color!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//fg-color!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//fg-color!: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//fg-color!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.FGColor = newVal + return arg0 + }, + }, + // Result: + // * Go(color.Color) + "Go(*widget.CustomTextGridStyle)//fg-color?": { + Doc: "Get *widget.CustomTextGridStyle FGColor value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CustomTextGridStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CustomTextGridStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//fg-color?: arg 1: " + "expected native of type *widget.CustomTextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//fg-color?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//fg-color?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.FGColor, "Go(color.Color)") + return resObj + }, + }, + // style is the text style a cell should use. + // + // Args: + // * recv - Go(*widget.CustomTextGridstyle) + // Result: + // * Go(fyne.Textstyle) + "Go(*widget.CustomTextGridStyle)//style": { + Doc: "(*widget.CustomTextGridStyle).Style", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CustomTextGridStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CustomTextGridStyle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//style: arg 1: " + "expected native of type *widget.CustomTextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//style: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//style: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Style() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.TextStyle)") + return res0Obj + }, + }, + // text-color is the color a cell should use for the text. + // + // Args: + // * recv - Go(*widget.CustomTextGridStyle) + // Result: + // * Go(color.Color) + "Go(*widget.CustomTextGridStyle)//text-color": { + Doc: "(*widget.CustomTextGridStyle).TextColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.CustomTextGridStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CustomTextGridStyle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//text-color: arg 1: " + "expected native of type *widget.CustomTextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//text-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//text-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.TextColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * text-style - Go(fyne.TextStyle) + // Result: + // * Go(fyne.TextStyle) + "Go(*widget.CustomTextGridStyle)//text-style!": { + Doc: "Set *widget.CustomTextGridStyle TextStyle value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CustomTextGridStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CustomTextGridStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//text-style!: arg 1: " + "expected native of type *widget.CustomTextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//text-style!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//text-style!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.TextStyle + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//text-style!: arg 2: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//text-style!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//text-style!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.TextStyle = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.TextStyle) + "Go(*widget.CustomTextGridStyle)//text-style?": { + Doc: "Get *widget.CustomTextGridStyle TextStyle value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.CustomTextGridStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.CustomTextGridStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//text-style?: arg 1: " + "expected native of type *widget.CustomTextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//text-style?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.CustomTextGridStyle)//text-style?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.TextStyle, "Go(*fyne.TextStyle)") + return resObj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.DisableableWidget)//base-widget!": { + Doc: "Set *widget.DisableableWidget BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//base-widget!: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.DisableableWidget)//base-widget?": { + Doc: "Get *widget.DisableableWidget BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//base-widget?: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // disable this widget so that it cannot be interacted with, updating any style appropriately. + // + // Args: + // * recv - Go(*widget.disableableWidget) + "Go(*widget.DisableableWidget)//disable": { + Doc: "(*widget.DisableableWidget).Disable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//disable: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//disable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//disable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Disable() + return arg0 + }, + }, + // disabled returns true if this widget is currently disabled or false if it can currently be interacted with. + // + // Args: + // * recv - Go(*widget.DisableableWidget) + // Result: + // * bool + "Go(*widget.DisableableWidget)//disabled": { + Doc: "(*widget.DisableableWidget).Disabled", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//disabled: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//disabled: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//disabled: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Disabled() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // enable this widget, updating any style or features appropriately. + // + // Args: + // * recv - Go(*widget.DisableableWidget) + "Go(*widget.DisableableWidget)//enable": { + Doc: "(*widget.DisableableWidget).Enable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//enable: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//enable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//enable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Enable() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.DisableableWidget) + // * wid - Go(fyne.Widget) + "Go(*widget.DisableableWidget)//extend-base-widget": { + Doc: "(*widget.DisableableWidget).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//extend-base-widget: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.DisableableWidget)//hidden!": { + Doc: "Set *widget.DisableableWidget Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//hidden!: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.DisableableWidget)//hidden?": { + Doc: "Get *widget.DisableableWidget Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//hidden?: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.DisableableWidget) + "Go(*widget.DisableableWidget)//hide": { + Doc: "(*widget.DisableableWidget).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//hide: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.DisableableWidget) + // Result: + // * Go(fyne.Size) + "Go(*widget.DisableableWidget)//min-size": { + Doc: "(*widget.DisableableWidget).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//min-size: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.DisableableWidget) + // * pos - Go(fyne.Position) + "Go(*widget.DisableableWidget)//move": { + Doc: "(*widget.DisableableWidget).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//move: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.DisableableWidget) + // Result: + // * Go(fyne.position) + "Go(*widget.DisableableWidget)//position": { + Doc: "(*widget.DisableableWidget).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//position: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.DisableableWidget) + "Go(*widget.DisableableWidget)//refresh": { + Doc: "(*widget.DisableableWidget).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//refresh: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.DisableableWidget) + // * size - Go(fyne.Size) + "Go(*widget.DisableableWidget)//resize": { + Doc: "(*widget.DisableableWidget).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//resize: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.DisableableWidget) + "Go(*widget.DisableableWidget)//show": { + Doc: "(*widget.DisableableWidget).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//show: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.DisableableWidget) + // Result: + // * Go(fyne.size) + "Go(*widget.DisableableWidget)//size": { + Doc: "(*widget.DisableableWidget).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//size: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.DisableableWidget) + // Result: + // * Go(fyne.theme) + "Go(*widget.DisableableWidget)//theme": { + Doc: "(*widget.DisableableWidget).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//theme: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.DisableableWidget) + // Result: + // * bool + "Go(*widget.DisableableWidget)//visible": { + Doc: "(*widget.DisableableWidget).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.DisableableWidget + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//visible: arg 1: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.DisableableWidget)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // accepts-tab returns if Entry accepts the Tab key or not. + // + // Implements: fyne.Tabbable + // + // Since: 2.1 + // + // Args: + // * recv - Go(*widget.Entry) + // Result: + // * bool + "Go(*widget.Entry)//accepts-tab": { + Doc: "(*widget.Entry).AcceptsTab", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//accepts-tab: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//accepts-tab: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//accepts-tab: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.AcceptsTab() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * action-item - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.Entry)//action-item!": { + Doc: "Set *widget.Entry ActionItem value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//action-item!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//action-item!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//action-item!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//action-item!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//action-item!: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//action-item!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//action-item!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.ActionItem = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.Entry)//action-item?": { + Doc: "Get *widget.Entry ActionItem value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//action-item?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//action-item?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//action-item?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.ActionItem, "Go(fyne.CanvasObject)") + return resObj + }, + }, + // append appends the text to the end of the entry. + // + // Since: 2.4 + // + // Args: + // * recv - Go(*widget.Entry) + // * text - string + "Go(*widget.Entry)//append": { + Doc: "(*widget.Entry).Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//append: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.Append(arg1Val) + return arg0 + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Entry)//base-widget!": { + Doc: "Set *widget.Entry BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//base-widget!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Entry)//base-widget?": { + Doc: "Get *widget.Entry BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//base-widget?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // bind connects the specified data source to this Entry. + // The current value will be displayed and any changes in the data will cause the widget to update. + // User interactions with this Entry will set the value into the data source. + // + // Since: 2.0 + // + // Args: + // * recv - Go(*widget.Entry) + // * data - Go(binding.String) + "Go(*widget.Entry)//bind": { + Doc: "(*widget.Entry).Bind", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//bind: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//bind: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//bind: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.String + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//bind: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//bind: arg 2: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//bind: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//bind: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Bind(arg1Val) + return arg0 + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.Entry) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Entry)//create-renderer": { + Doc: "(*widget.Entry).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//create-renderer: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // cursor returns the cursor type of this widget + // + // Implements: desktop.cursorable + // + // Args: + // * recv - Go(*widget.Entry) + // Result: + // * Go(desktop.cursor) + "Go(*widget.Entry)//cursor": { + Doc: "(*widget.Entry).Cursor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Cursor() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(desktop.Cursor)") + return res0Obj + }, + }, + // Args: + // * cursor-column - integer + // Result: + // * integer + "Go(*widget.Entry)//cursor-column!": { + Doc: "Set *widget.Entry CursorColumn value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor-column!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor-column!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor-column!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal int + if vc, ok := arg1.(env.Integer); ok { + newVal = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor-column!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.CursorColumn = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Entry)//cursor-column?": { + Doc: "Get *widget.Entry CursorColumn value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor-column?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor-column?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor-column?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(self.CursorColumn)) + return resObj + }, + }, + // Args: + // * cursor-row - integer + // Result: + // * integer + "Go(*widget.Entry)//cursor-row!": { + Doc: "Set *widget.Entry CursorRow value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor-row!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor-row!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor-row!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal int + if vc, ok := arg1.(env.Integer); ok { + newVal = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor-row!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.CursorRow = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Entry)//cursor-row?": { + Doc: "Get *widget.Entry CursorRow value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor-row?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor-row?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//cursor-row?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(self.CursorRow)) + return resObj + }, + }, + // disable this widget so that it cannot be interacted with, updating any style appropriately. + // + // Implements: fyne.disableable + // + // Args: + // * recv - Go(*widget.Entry) + "Go(*widget.Entry)//disable": { + Doc: "(*widget.Entry).Disable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//disable: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//disable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//disable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Disable() + return arg0 + }, + }, + // Args: + // * disableable-widget - Go(widget.DisableableWidget) + // Result: + // * Go(widget.DisableableWidget) + "Go(*widget.Entry)//disableable-widget!": { + Doc: "Set *widget.Entry DisableableWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//disableable-widget!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//disableable-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//disableable-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.DisableableWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//disableable-widget!: arg 2: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//disableable-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//disableable-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.DisableableWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.DisableableWidget) + "Go(*widget.Entry)//disableable-widget?": { + Doc: "Get *widget.Entry DisableableWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//disableable-widget?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//disableable-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//disableable-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.DisableableWidget, "Go(*widget.DisableableWidget)") + return resObj + }, + }, + // disabled returns whether the entry is disabled or read-only. + // + // Implements: fyne.Disableable + // + // Args: + // * recv - Go(*widget.Entry) + // Result: + // * bool + "Go(*widget.Entry)//disabled": { + Doc: "(*widget.Entry).Disabled", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//disabled: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//disabled: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//disabled: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Disabled() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // double-tapped is called when this entry has been double tapped so we should select text below the pointer + // + // Implements: fyne.DoubleTappable + // + // Args: + // * recv - Go(*widget.Entry) + // * p - Go(*fyne.PointEvent) + "Go(*widget.Entry)//double-tapped": { + Doc: "(*widget.Entry).DoubleTapped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//double-tapped: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//double-tapped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//double-tapped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//double-tapped: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//double-tapped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//double-tapped: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.DoubleTapped(arg1Val) + return arg0 + }, + }, + // drag-end is called at end of a drag event. + // + // Implements: fyne.Draggable + // + // Args: + // * recv - Go(*widget.Entry) + "Go(*widget.Entry)//drag-end": { + Doc: "(*widget.Entry).DragEnd", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//drag-end: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//drag-end: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//drag-end: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.DragEnd() + return arg0 + }, + }, + // dragged is called when the pointer moves while a button is held down. + // It updates the selection accordingly. + // + // Implements: fyne.Draggable + // + // Args: + // * recv - Go(*widget.Entry) + // * d - Go(*fyne.DragEvent) + "Go(*widget.Entry)//dragged": { + Doc: "(*widget.Entry).Dragged", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//dragged: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//dragged: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//dragged: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.DragEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.DragEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//dragged: arg 2: " + "expected native of type *fyne.DragEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//dragged: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//dragged: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Dragged(arg1Val) + return arg0 + }, + }, + // enable this widget, updating any style or features appropriately. + // + // Implements: fyne.Disableable + // + // Args: + // * recv - Go(*widget.Entry) + "Go(*widget.Entry)//enable": { + Doc: "(*widget.Entry).Enable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//enable: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//enable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//enable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Enable() + return arg0 + }, + }, + // extend-base-widget is used by an extending widget to make use of BaseWidget functionality. + // + // Args: + // * recv - Go(*widget.Entry) + // * wid - Go(fyne.Widget) + "Go(*widget.Entry)//extend-base-widget": { + Doc: "(*widget.Entry).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//extend-base-widget: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // focus-gained is called when the Entry has been given focus. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Entry) + "Go(*widget.Entry)//focus-gained": { + Doc: "(*widget.Entry).FocusGained", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//focus-gained: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//focus-gained: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//focus-gained: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusGained() + return arg0 + }, + }, + // focus-lost is called when the Entry has had focus removed. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Entry) + "Go(*widget.Entry)//focus-lost": { + Doc: "(*widget.Entry).FocusLost", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//focus-lost: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//focus-lost: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//focus-lost: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusLost() + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Entry)//hidden!": { + Doc: "Set *widget.Entry Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//hidden!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Entry)//hidden?": { + Doc: "Get *widget.Entry Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//hidden?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // hide hides the entry. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.Entry) + "Go(*widget.Entry)//hide": { + Doc: "(*widget.Entry).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//hide: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // key-down handler for keypress events - used to store shift modifier state for text selection + // + // Implements: desktop.Keyable + // + // Args: + // * recv - Go(*widget.Entry) + // * key - Go(*fyne.KeyEvent) + "Go(*widget.Entry)//key-down": { + Doc: "(*widget.Entry).KeyDown", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//key-down: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//key-down: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//key-down: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//key-down: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//key-down: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//key-down: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.KeyDown(arg1Val) + return arg0 + }, + }, + // key-up handler for key release events - used to reset shift modifier state for text selection + // + // Implements: desktop.Keyable + // + // Args: + // * recv - Go(*widget.Entry) + // * key - Go(*fyne.KeyEvent) + "Go(*widget.Entry)//key-up": { + Doc: "(*widget.Entry).KeyUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//key-up: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//key-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//key-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//key-up: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//key-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//key-up: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.KeyUp(arg1Val) + return arg0 + }, + }, + // keyboard implements the keyboardable interface + // + // Implements: mobile.keyboardable + // + // Args: + // * recv - Go(*widget.Entry) + // Result: + // * integer + "Go(*widget.Entry)//keyboard": { + Doc: "(*widget.Entry).Keyboard", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//keyboard: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//keyboard: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//keyboard: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Keyboard() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(int32(res0))) + return res0Obj + }, + }, + // min-size returns the size that this widget should not shrink below. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.Entry) + // Result: + // * Go(fyne.Size) + "Go(*widget.Entry)//min-size": { + Doc: "(*widget.Entry).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//min-size: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // mouse-down called on mouse click, this triggers a mouse click which can move the cursor, + // update the existing selection (if shift is held), or start a selection dragging operation. + // + // Implements: desktop.Mouseable + // + // Args: + // * recv - Go(*widget.Entry) + // * m - Go(*desktop.MouseEvent) + "Go(*widget.Entry)//mouse-down": { + Doc: "(*widget.Entry).MouseDown", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//mouse-down: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//mouse-down: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//mouse-down: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//mouse-down: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//mouse-down: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//mouse-down: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseDown(arg1Val) + return arg0 + }, + }, + // mouse-up called on mouse release + // If a mouse drag event has completed then check to see if it has resulted in an empty selection, + // if so, and if a text select key isn't held, then disable selecting + // + // Implements: desktop.Mouseable + // + // Args: + // * recv - Go(*widget.Entry) + // * m - Go(*desktop.MouseEvent) + "Go(*widget.Entry)//mouse-up": { + Doc: "(*widget.Entry).MouseUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//mouse-up: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//mouse-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//mouse-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//mouse-up: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//mouse-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//mouse-up: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseUp(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Entry) + // * pos - Go(fyne.Position) + "Go(*widget.Entry)//move": { + Doc: "(*widget.Entry).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//move: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * multi-line - bool + // Result: + // * bool + "Go(*widget.Entry)//multi-line!": { + Doc: "Set *widget.Entry MultiLine value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//multi-line!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//multi-line!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//multi-line!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//multi-line!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.MultiLine = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Entry)//multi-line?": { + Doc: "Get *widget.Entry MultiLine value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//multi-line?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//multi-line?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//multi-line?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.MultiLine)) + return resObj + }, + }, + // Args: + // * on-changed - fn { string } + // Result: + // * fn { string } + "Go(*widget.Entry)//on-changed!": { + Doc: "Set *widget.Entry OnChanged value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-changed!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-changed!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-changed!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(string) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-changed!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-changed!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-changed!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnChanged = newVal + return arg0 + }, + }, + // Result: + // * fn { string } + "Go(*widget.Entry)//on-changed?": { + Doc: "Get *widget.Entry OnChanged value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-changed?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-changed?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-changed?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-changed?: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + self.OnChanged(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-cursor-changed - fn { } + // Result: + // * fn { } + "Go(*widget.Entry)//on-cursor-changed!": { + Doc: "Set *widget.Entry OnCursorChanged value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-cursor-changed!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-cursor-changed!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-cursor-changed!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-cursor-changed!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-cursor-changed!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-cursor-changed!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnCursorChanged = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*widget.Entry)//on-cursor-changed?": { + Doc: "Get *widget.Entry OnCursorChanged value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-cursor-changed?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-cursor-changed?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-cursor-changed?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.OnCursorChanged() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-submitted - fn { string } + // Result: + // * fn { string } + "Go(*widget.Entry)//on-submitted!": { + Doc: "Set *widget.Entry OnSubmitted value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-submitted!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-submitted!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-submitted!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(string) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-submitted!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-submitted!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-submitted!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnSubmitted = newVal + return arg0 + }, + }, + // Result: + // * fn { string } + "Go(*widget.Entry)//on-submitted?": { + Doc: "Get *widget.Entry OnSubmitted value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-submitted?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-submitted?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-submitted?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//on-submitted?: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + self.OnSubmitted(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * password - bool + // Result: + // * bool + "Go(*widget.Entry)//password!": { + Doc: "Set *widget.Entry Password value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//password!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//password!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//password!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//password!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Password = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Entry)//password?": { + Doc: "Get *widget.Entry Password value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//password?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//password?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//password?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Password)) + return resObj + }, + }, + // Args: + // * place-holder - string + // Result: + // * string + "Go(*widget.Entry)//place-holder!": { + Doc: "Set *widget.Entry PlaceHolder value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//place-holder!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//place-holder!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//place-holder!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//place-holder!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.PlaceHolder = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.Entry)//place-holder?": { + Doc: "Get *widget.Entry PlaceHolder value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//place-holder?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//place-holder?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//place-holder?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.PlaceHolder) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Entry) + // Result: + // * Go(fyne.position) + "Go(*widget.Entry)//position": { + Doc: "(*widget.Entry).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//position: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // redo un-does the last undo action. + // + // Since: 2.5 + // + // Args: + // * recv - Go(*widget.Entry) + "Go(*widget.Entry)//redo": { + Doc: "(*widget.Entry).Redo", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//redo: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//redo: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//redo: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Redo() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Entry) + "Go(*widget.Entry)//refresh": { + Doc: "(*widget.Entry).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//refresh: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Entry) + // * size - Go(fyne.Size) + "Go(*widget.Entry)//resize": { + Doc: "(*widget.Entry).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//resize: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // selected-text returns the text currently selected in this Entry. + // If there is no selection it will return the empty string. + // + // Args: + // * recv - Go(*widget.Entry) + // Result: + // * string + "Go(*widget.Entry)//selected-text": { + Doc: "(*widget.Entry).SelectedText", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//selected-text: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//selected-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//selected-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.SelectedText() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // set-min-rows-visible forces a multi-line entry to show `count` number of rows without scrolling. + // This is not a validation or requirement, it just impacts the minimum visible size. + // Use this carefully as Fyne apps can run on small screens so you may wish to add a scroll container if + // this number is high. Default is 3. + // + // Since: 2.2 + // + // Args: + // * recv - Go(*widget.Entry) + // * count - integer + "Go(*widget.Entry)//set-min-rows-visible": { + Doc: "(*widget.Entry).SetMinRowsVisible", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-min-rows-visible: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-min-rows-visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-min-rows-visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-min-rows-visible: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetMinRowsVisible(arg1Val) + return arg0 + }, + }, + // set-on-validation-changed is intended for parent widgets or containers to hook into the validation. + // The function might be overwritten by a parent that cares about child validation (e.g. widget.Form). + // + // Args: + // * recv - Go(*widget.Entry) + // * callback - fn { Go(error) } + "Go(*widget.Entry)//set-on-validation-changed": { + Doc: "(*widget.Entry).SetOnValidationChanged", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-on-validation-changed: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-on-validation-changed: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-on-validation-changed: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(error) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-on-validation-changed: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 error) { + var farg0Val env.Object + if farg0 != nil { + farg0Val = env.NewError(farg0.Error()) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-on-validation-changed: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-on-validation-changed: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnValidationChanged(arg1Val) + return arg0 + }, + }, + // set-place-holder sets the text that will be displayed if the entry is otherwise empty + // + // Args: + // * recv - Go(*widget.Entry) + // * text - string + "Go(*widget.Entry)//set-place-holder": { + Doc: "(*widget.Entry).SetPlaceHolder", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-place-holder: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-place-holder: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-place-holder: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-place-holder: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetPlaceHolder(arg1Val) + return arg0 + }, + }, + // set-text manually sets the text of the Entry to the given text value. + // Calling set-text resets all undo history. + // + // Args: + // * recv - Go(*widget.Entry) + // * text - string + "Go(*widget.Entry)//set-text": { + Doc: "(*widget.Entry).SetText", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-text: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-text: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetText(arg1Val) + return arg0 + }, + }, + // set-validation-error manually updates the validation status until the next input change. + // + // Args: + // * recv - Go(*widget.Entry) + // * err - Go(error) + "Go(*widget.Entry)//set-validation-error": { + Doc: "(*widget.Entry).SetValidationError", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-validation-error: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-validation-error: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-validation-error: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val error + switch v := arg1.(type) { + case env.String: + arg1Val = errors.New(v.Value) + case env.Error: + arg1Val = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-validation-error: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//set-validation-error: arg 2: " + "expected error, string or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetValidationError(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Entry) + "Go(*widget.Entry)//show": { + Doc: "(*widget.Entry).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//show: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Entry) + // Result: + // * Go(fyne.size) + "Go(*widget.Entry)//size": { + Doc: "(*widget.Entry).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//size: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // tapped is called when this entry has been tapped. We update the cursor position in + // device-specific callbacks (MouseDown() and TouchDown()). + // + // Implements: fyne.Tappable + // + // Args: + // * recv - Go(*widget.Entry) + // * ev - Go(*fyne.PointEvent) + "Go(*widget.Entry)//tapped": { + Doc: "(*widget.Entry).Tapped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//tapped: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//tapped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//tapped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//tapped: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//tapped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//tapped: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Tapped(arg1Val) + return arg0 + }, + }, + // tapped-secondary is called when right or alternative tap is invoked. + // + // Opens the PopUpMenu with `Paste` item to paste text from the clipboard. + // + // Implements: fyne.SecondaryTappable + // + // Args: + // * recv - Go(*widget.Entry) + // * pe - Go(*fyne.PointEvent) + "Go(*widget.Entry)//tapped-secondary": { + Doc: "(*widget.Entry).TappedSecondary", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//tapped-secondary: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//tapped-secondary: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//tapped-secondary: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//tapped-secondary: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//tapped-secondary: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//tapped-secondary: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TappedSecondary(arg1Val) + return arg0 + }, + }, + // Args: + // * text - string + // Result: + // * string + "Go(*widget.Entry)//text!": { + Doc: "Set *widget.Entry Text value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Text = newVal + return arg0 + }, + }, + // Args: + // * text-style - Go(fyne.TextStyle) + // Result: + // * Go(fyne.TextStyle) + "Go(*widget.Entry)//text-style!": { + Doc: "Set *widget.Entry TextStyle value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text-style!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text-style!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text-style!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.TextStyle + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text-style!: arg 2: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text-style!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text-style!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.TextStyle = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.TextStyle) + "Go(*widget.Entry)//text-style?": { + Doc: "Get *widget.Entry TextStyle value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text-style?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text-style?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text-style?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.TextStyle, "Go(*fyne.TextStyle)") + return resObj + }, + }, + // Result: + // * string + "Go(*widget.Entry)//text?": { + Doc: "Get *widget.Entry Text value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//text?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Text) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Entry) + // Result: + // * Go(fyne.theme) + "Go(*widget.Entry)//theme": { + Doc: "(*widget.Entry).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//theme: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // touch-cancel is called when this entry gets a touch cancel event on mobile device (app was removed from focus). + // + // Since: 2.1 + // + // Implements: mobile.Touchable + // + // Args: + // * recv - Go(*widget.Entry) + // * 1 - Go(*mobile.TouchEvent) + "Go(*widget.Entry)//touch-cancel": { + Doc: "(*widget.Entry).TouchCancel", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-cancel: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-cancel: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-cancel: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *mobile.TouchEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-cancel: arg 2: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-cancel: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-cancel: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TouchCancel(arg1Val) + return arg0 + }, + }, + // touch-down is called when this entry gets a touch down event on mobile device, we ensure we have focus. + // + // Since: 2.1 + // + // Implements: mobile.Touchable + // + // Args: + // * recv - Go(*widget.Entry) + // * ev - Go(*mobile.TouchEvent) + "Go(*widget.Entry)//touch-down": { + Doc: "(*widget.Entry).TouchDown", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-down: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-down: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-down: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *mobile.TouchEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-down: arg 2: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-down: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-down: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TouchDown(arg1Val) + return arg0 + }, + }, + // touch-up is called when this entry gets a touch up event on mobile device. + // + // Since: 2.1 + // + // Implements: mobile.Touchable + // + // Args: + // * recv - Go(*widget.Entry) + // * 1 - Go(*mobile.TouchEvent) + "Go(*widget.Entry)//touch-up": { + Doc: "(*widget.Entry).TouchUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-up: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *mobile.TouchEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-up: arg 2: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//touch-up: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TouchUp(arg1Val) + return arg0 + }, + }, + // typed-key receives key input events when the Entry widget is focused. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Entry) + // * key - Go(*fyne.KeyEvent) + "Go(*widget.Entry)//typed-key": { + Doc: "(*widget.Entry).TypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-key: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-key: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-key: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedKey(arg1Val) + return arg0 + }, + }, + // typed-rune receives text input events when the Entry widget is focused. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Entry) + // * r - Go(rune) + "Go(*widget.Entry)//typed-rune": { + Doc: "(*widget.Entry).TypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-rune: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-rune: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-rune: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedRune(arg1Val) + return arg0 + }, + }, + // typed-shortcut implements the Shortcutable interface + // + // Implements: fyne.Shortcutable + // + // Args: + // * recv - Go(*widget.Entry) + // * shortcut - Go(fyne.Shortcut) + "Go(*widget.Entry)//typed-shortcut": { + Doc: "(*widget.Entry).TypedShortcut", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-shortcut: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-shortcut: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-shortcut: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Shortcut + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Shortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-shortcut: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Shortcut); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-shortcut: arg 2: " + "expected native of type fyne.Shortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-shortcut: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//typed-shortcut: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedShortcut(arg1Val) + return arg0 + }, + }, + // unbind disconnects any configured data source from this Entry. + // The current value will remain at the last value of the data source. + // + // Since: 2.0 + // + // Args: + // * recv - Go(*widget.Entry) + "Go(*widget.Entry)//unbind": { + Doc: "(*widget.Entry).Unbind", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//unbind: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//unbind: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//unbind: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unbind() + return arg0 + }, + }, + // undo un-does the last modifying user-action. + // + // Since: 2.5 + // + // Args: + // * recv - Go(*widget.Entry) + "Go(*widget.Entry)//undo": { + Doc: "(*widget.Entry).Undo", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//undo: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//undo: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//undo: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Undo() + return arg0 + }, + }, + // validate validates the current text in the widget. + // + // Args: + // * recv - Go(*widget.Entry) + // Result: + // * error + "Go(*widget.Entry)//validate": { + Doc: "(*widget.Entry).Validate", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//validate: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//validate: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//validate: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Validate() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * validator - fn { string } -> Go(error) + // Result: + // * fn { string } -> Go(error) + "Go(*widget.Entry)//validator!": { + Doc: "Set *widget.Entry Validator value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//validator!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//validator!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//validator!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.StringValidator + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.StringValidator + if natOk { + natVal, natValOk = nat.Value.(fyne.StringValidator) + } + if natValOk { + newVal = natVal + } else { + var u func(string) error + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//validator!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + u = func(farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Entry)//validator!: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Entry)//validator!: arg 2: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//validator!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + u = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//validator!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + newVal = fyne.StringValidator(u) + } + } + self.Validator = newVal + return arg0 + }, + }, + // Result: + // * fn { string } -> Go(error) + "Go(*widget.Entry)//validator?": { + Doc: "Get *widget.Entry Validator value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//validator?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//validator?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//validator?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//validator?: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + resErr := (func(string) error)(self.Validator)(arg0Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Entry) + // Result: + // * bool + "Go(*widget.Entry)//visible": { + Doc: "(*widget.Entry).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//visible: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * wrapping - integer + // Result: + // * integer + "Go(*widget.Entry)//wrapping!": { + Doc: "Set *widget.Entry Wrapping value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//wrapping!: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//wrapping!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//wrapping!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.TextWrap + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextWrap + if natOk { + natVal, natValOk = nat.Value.(fyne.TextWrap) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//wrapping!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.TextWrap(u) + } + } + self.Wrapping = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Entry)//wrapping?": { + Doc: "Get *widget.Entry Wrapping value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Entry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//wrapping?: arg 1: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//wrapping?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Entry)//wrapping?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Wrapping))) + return resObj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.FileIcon)//base-widget!": { + Doc: "Set *widget.FileIcon BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//base-widget!: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.FileIcon)//base-widget?": { + Doc: "Get *widget.FileIcon BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//base-widget?: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.FileIcon) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.FileIcon)//create-renderer": { + Doc: "(*widget.FileIcon).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//create-renderer: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.FileIcon) + // * wid - Go(fyne.Widget) + "Go(*widget.FileIcon)//extend-base-widget": { + Doc: "(*widget.FileIcon).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//extend-base-widget: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.FileIcon)//hidden!": { + Doc: "Set *widget.FileIcon Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//hidden!: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.FileIcon)//hidden?": { + Doc: "Get *widget.FileIcon Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//hidden?: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.FileIcon) + "Go(*widget.FileIcon)//hide": { + Doc: "(*widget.FileIcon).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//hide: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Args: + // * recv - Go(*widget.FileIcon) + // Result: + // * Go(fyne.Size) + "Go(*widget.FileIcon)//min-size": { + Doc: "(*widget.FileIcon).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//min-size: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.FileIcon) + // * pos - Go(fyne.Position) + "Go(*widget.FileIcon)//move": { + Doc: "(*widget.FileIcon).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//move: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.FileIcon) + // Result: + // * Go(fyne.position) + "Go(*widget.FileIcon)//position": { + Doc: "(*widget.FileIcon).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//position: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.FileIcon) + "Go(*widget.FileIcon)//refresh": { + Doc: "(*widget.FileIcon).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//refresh: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.FileIcon) + // * size - Go(fyne.Size) + "Go(*widget.FileIcon)//resize": { + Doc: "(*widget.FileIcon).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//resize: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * selected - bool + // Result: + // * bool + "Go(*widget.FileIcon)//selected!": { + Doc: "Set *widget.FileIcon Selected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//selected!: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//selected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//selected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//selected!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Selected = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.FileIcon)//selected?": { + Doc: "Get *widget.FileIcon Selected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//selected?: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//selected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//selected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Selected)) + return resObj + }, + }, + // set-selected makes the file look like it is selected. + // + // Deprecated: Selection is now handled externally. + // + // Args: + // * recv - Go(*widget.FileIcon) + // * selected - bool + "Go(*widget.FileIcon)//set-selected": { + Doc: "(*widget.FileIcon).SetSelected", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//set-selected: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//set-selected: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//set-selected: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//set-selected: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetSelected(arg1Val) + return arg0 + }, + }, + // set-uri changes the URI and makes the icon reflect a different file + // + // Args: + // * recv - Go(*widget.FileIcon) + // * uri - Go(fyne.URI) + "Go(*widget.FileIcon)//set-uri": { + Doc: "(*widget.FileIcon).SetURI", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//set-uri: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//set-uri: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//set-uri: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//set-uri: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//set-uri: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//set-uri: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//set-uri: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetURI(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.FileIcon) + "Go(*widget.FileIcon)//show": { + Doc: "(*widget.FileIcon).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//show: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.FileIcon) + // Result: + // * Go(fyne.size) + "Go(*widget.FileIcon)//size": { + Doc: "(*widget.FileIcon).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//size: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.FileIcon) + // Result: + // * Go(fyne.theme) + "Go(*widget.FileIcon)//theme": { + Doc: "(*widget.FileIcon).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//theme: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * uri - Go(fyne.URI) + // Result: + // * Go(fyne.URI) + "Go(*widget.FileIcon)//uri!": { + Doc: "Set *widget.FileIcon URI value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//uri!: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//uri!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//uri!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//uri!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//uri!: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//uri!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//uri!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.URI = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.URI) + "Go(*widget.FileIcon)//uri?": { + Doc: "Get *widget.FileIcon URI value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//uri?: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//uri?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//uri?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.URI, "Go(fyne.URI)") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.FileIcon) + // Result: + // * bool + "Go(*widget.FileIcon)//visible": { + Doc: "(*widget.FileIcon).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.FileIcon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FileIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//visible: arg 1: " + "expected native of type *widget.FileIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FileIcon)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // append adds a new row to the form, using the text as a label next to the specified Widget + // + // Args: + // * recv - Go(*widget.Form) + // * text - string + // * widget - Go(fyne.CanvasObject) + "Go(*widget.Form)//append": { + Doc: "(*widget.Form).Append", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//append: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.CanvasObject + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//append: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//append: arg 3: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//append: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//append: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Append(arg1Val, arg2Val) + return arg0 + }, + }, + // append-item adds the specified row to the end of the Form + // + // Args: + // * recv - Go(*widget.Form) + // * item - Go(*widget.FormItem) + "Go(*widget.Form)//append-item": { + Doc: "(*widget.Form).AppendItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//append-item: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//append-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//append-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *widget.FormItem + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FormItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//append-item: arg 2: " + "expected native of type *widget.FormItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//append-item: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//append-item: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AppendItem(arg1Val) + return arg0 + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Form)//base-widget!": { + Doc: "Set *widget.Form BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//base-widget!: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Form)//base-widget?": { + Doc: "Get *widget.Form BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//base-widget?: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // Args: + // * cancel-text - string + // Result: + // * string + "Go(*widget.Form)//cancel-text!": { + Doc: "Set *widget.Form CancelText value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//cancel-text!: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//cancel-text!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//cancel-text!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//cancel-text!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.CancelText = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.Form)//cancel-text?": { + Doc: "Get *widget.Form CancelText value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//cancel-text?: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//cancel-text?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//cancel-text?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.CancelText) + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.Form) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Form)//create-renderer": { + Doc: "(*widget.Form).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//create-renderer: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // disable disables submitting this form. + // + // Since: 2.1 + // + // Args: + // * recv - Go(*widget.Form) + "Go(*widget.Form)//disable": { + Doc: "(*widget.Form).Disable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//disable: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//disable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//disable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Disable() + return arg0 + }, + }, + // disabled returns whether submitting the form is disabled. + // Note that, if the form fails validation, the submit button may be + // disabled even if this method returns true. + // + // Since: 2.1 + // + // Args: + // * recv - Go(*widget.Form) + // Result: + // * bool + "Go(*widget.Form)//disabled": { + Doc: "(*widget.Form).Disabled", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//disabled: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//disabled: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//disabled: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Disabled() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // enable enables submitting this form. + // + // Since: 2.1 + // + // Args: + // * recv - Go(*widget.Form) + "Go(*widget.Form)//enable": { + Doc: "(*widget.Form).Enable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//enable: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//enable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//enable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Enable() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Form) + // * wid - Go(fyne.Widget) + "Go(*widget.Form)//extend-base-widget": { + Doc: "(*widget.Form).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//extend-base-widget: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Form)//hidden!": { + Doc: "Set *widget.Form Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//hidden!: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Form)//hidden?": { + Doc: "Get *widget.Form Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//hidden?: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Form) + "Go(*widget.Form)//hide": { + Doc: "(*widget.Form).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//hide: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * items - block[Go(*widget.FormItem)] + // Result: + // * block[Go(*widget.FormItem)] + "Go(*widget.Form)//items!": { + Doc: "Set *widget.Form Items value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//items!: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//items!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//items!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []*widget.FormItem + switch v := arg1.(type) { + case env.Block: + newVal = make([]*widget.FormItem, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FormItem); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//items!: arg 2: " + "block item: " + "expected native of type *widget.FormItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//items!: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//items!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//items!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//items!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Items = newVal + return arg0 + }, + }, + // Result: + // * block[Go(*widget.FormItem)] + "Go(*widget.Form)//items?": { + Doc: "Get *widget.Form Items value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//items?: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//items?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//items?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Items)) + for i, it := range self.Items { + items[i] = *env.NewNative(ps.Idx, it, "Go(*widget.FormItem)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Args: + // * recv - Go(*widget.Form) + // Result: + // * Go(fyne.Size) + "Go(*widget.Form)//min-size": { + Doc: "(*widget.Form).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//min-size: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Form) + // * pos - Go(fyne.Position) + "Go(*widget.Form)//move": { + Doc: "(*widget.Form).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//move: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-cancel - fn { } + // Result: + // * fn { } + "Go(*widget.Form)//on-cancel!": { + Doc: "Set *widget.Form OnCancel value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-cancel!: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-cancel!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-cancel!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-cancel!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-cancel!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-cancel!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnCancel = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*widget.Form)//on-cancel?": { + Doc: "Get *widget.Form OnCancel value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-cancel?: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-cancel?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-cancel?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.OnCancel() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-submit - fn { } + // Result: + // * fn { } + "Go(*widget.Form)//on-submit!": { + Doc: "Set *widget.Form OnSubmit value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-submit!: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-submit!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-submit!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-submit!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-submit!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-submit!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnSubmit = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*widget.Form)//on-submit?": { + Doc: "Get *widget.Form OnSubmit value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-submit?: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-submit?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//on-submit?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.OnSubmit() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * orientation - integer + // Result: + // * integer + "Go(*widget.Form)//orientation!": { + Doc: "Set *widget.Form Orientation value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//orientation!: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//orientation!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//orientation!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal widget.Orientation + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.Orientation + if natOk { + natVal, natValOk = nat.Value.(widget.Orientation) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//orientation!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = widget.Orientation(u) + } + } + self.Orientation = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Form)//orientation?": { + Doc: "Get *widget.Form Orientation value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//orientation?: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//orientation?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//orientation?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Orientation))) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Form) + // Result: + // * Go(fyne.position) + "Go(*widget.Form)//position": { + Doc: "(*widget.Form).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//position: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // refresh updates the widget state when requested. + // + // Args: + // * recv - Go(*widget.Form) + "Go(*widget.Form)//refresh": { + Doc: "(*widget.Form).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//refresh: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Form) + // * size - Go(fyne.Size) + "Go(*widget.Form)//resize": { + Doc: "(*widget.Form).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//resize: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // set-on-validation-changed is intended for parent widgets or containers to hook into the validation. + // The function might be overwritten by a parent that cares about child validation (e.g. widget.Form) + // + // Args: + // * recv - Go(*widget.Form) + // * callback - fn { Go(error) } + "Go(*widget.Form)//set-on-validation-changed": { + Doc: "(*widget.Form).SetOnValidationChanged", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//set-on-validation-changed: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//set-on-validation-changed: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//set-on-validation-changed: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(error) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//set-on-validation-changed: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 error) { + var farg0Val env.Object + if farg0 != nil { + farg0Val = env.NewError(farg0.Error()) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//set-on-validation-changed: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//set-on-validation-changed: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnValidationChanged(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Form) + "Go(*widget.Form)//show": { + Doc: "(*widget.Form).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//show: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Form) + // Result: + // * Go(fyne.size) + "Go(*widget.Form)//size": { + Doc: "(*widget.Form).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//size: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * submit-text - string + // Result: + // * string + "Go(*widget.Form)//submit-text!": { + Doc: "Set *widget.Form SubmitText value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//submit-text!: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//submit-text!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//submit-text!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//submit-text!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.SubmitText = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.Form)//submit-text?": { + Doc: "Get *widget.Form SubmitText value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//submit-text?: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//submit-text?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//submit-text?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.SubmitText) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Form) + // Result: + // * Go(fyne.theme) + "Go(*widget.Form)//theme": { + Doc: "(*widget.Form).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//theme: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // validate validates the entire form and returns the first error that is encountered. + // + // Args: + // * recv - Go(*widget.Form) + // Result: + // * error + "Go(*widget.Form)//validate": { + Doc: "(*widget.Form).Validate", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//validate: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//validate: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//validate: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Validate() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Form) + // Result: + // * bool + "Go(*widget.Form)//visible": { + Doc: "(*widget.Form).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Form + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Form); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//visible: arg 1: " + "expected native of type *widget.Form, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Form)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * hint-text - string + // Result: + // * string + "Go(*widget.FormItem)//hint-text!": { + Doc: "Set *widget.FormItem HintText value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.FormItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FormItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//hint-text!: arg 1: " + "expected native of type *widget.FormItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//hint-text!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//hint-text!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//hint-text!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.HintText = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.FormItem)//hint-text?": { + Doc: "Get *widget.FormItem HintText value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.FormItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FormItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//hint-text?: arg 1: " + "expected native of type *widget.FormItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//hint-text?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//hint-text?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.HintText) + return resObj + }, + }, + // Args: + // * text - string + // Result: + // * string + "Go(*widget.FormItem)//text!": { + Doc: "Set *widget.FormItem Text value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.FormItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FormItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//text!: arg 1: " + "expected native of type *widget.FormItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//text!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//text!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//text!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Text = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.FormItem)//text?": { + Doc: "Get *widget.FormItem Text value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.FormItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FormItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//text?: arg 1: " + "expected native of type *widget.FormItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//text?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//text?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Text) + return resObj + }, + }, + // Args: + // * widget - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.FormItem)//widget!": { + Doc: "Set *widget.FormItem Widget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.FormItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FormItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//widget!: arg 1: " + "expected native of type *widget.FormItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//widget!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//widget!: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Widget = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.FormItem)//widget?": { + Doc: "Get *widget.FormItem Widget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.FormItem + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FormItem); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//widget?: arg 1: " + "expected native of type *widget.FormItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.FormItem)//widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Widget, "Go(fyne.CanvasObject)") + return resObj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.GridWrap)//base-widget!": { + Doc: "Set *widget.GridWrap BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//base-widget!: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.GridWrap)//base-widget?": { + Doc: "Get *widget.GridWrap BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//base-widget?: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // column-count returns the number of columns that are/will be shown + // in this GridWrap, based on the widget's current width. + // + // Since: 2.5 + // + // Args: + // * recv - Go(*widget.GridWrap) + // Result: + // * integer + "Go(*widget.GridWrap)//column-count": { + Doc: "(*widget.GridWrap).ColumnCount", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//column-count: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//column-count: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//column-count: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ColumnCount() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * create-item - fn { } -> Go(fyne.CanvasObject) + // Result: + // * fn { } -> Go(fyne.CanvasObject) + "Go(*widget.GridWrap)//create-item!": { + Doc: "Set *widget.GridWrap CreateItem value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//create-item!: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//create-item!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//create-item!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() fyne.CanvasObject + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//create-item!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.GridWrap)//create-item!: arg 2: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.GridWrap)//create-item!: arg 2: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.GridWrap)//create-item!: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.GridWrap)//create-item!: arg 2: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//create-item!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//create-item!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.CreateItem = newVal + return arg0 + }, + }, + // Result: + // * fn { } -> Go(fyne.CanvasObject) + "Go(*widget.GridWrap)//create-item?": { + Doc: "Get *widget.GridWrap CreateItem value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//create-item?: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//create-item?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//create-item?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := self.CreateItem() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, 0, false, false, "Returned func") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer. + // + // Args: + // * recv - Go(*widget.GridWrap) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.GridWrap)//create-renderer": { + Doc: "(*widget.GridWrap).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//create-renderer: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.GridWrap) + // * wid - Go(fyne.Widget) + "Go(*widget.GridWrap)//extend-base-widget": { + Doc: "(*widget.GridWrap).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//extend-base-widget: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // focus-gained is called after this GridWrap has gained focus. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.GridWrap) + "Go(*widget.GridWrap)//focus-gained": { + Doc: "(*widget.GridWrap).FocusGained", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//focus-gained: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//focus-gained: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//focus-gained: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusGained() + return arg0 + }, + }, + // focus-lost is called after this GridWrap has lost focus. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.GridWrap) + "Go(*widget.GridWrap)//focus-lost": { + Doc: "(*widget.GridWrap).FocusLost", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//focus-lost: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//focus-lost: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//focus-lost: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusLost() + return arg0 + }, + }, + // get-scroll-offset returns the current scroll offset position + // + // Args: + // * recv - Go(*widget.GridWrap) + // Result: + // * decimal + "Go(*widget.GridWrap)//get-scroll-offset": { + Doc: "(*widget.GridWrap).GetScrollOffset", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//get-scroll-offset: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//get-scroll-offset: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//get-scroll-offset: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.GetScrollOffset() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.GridWrap)//hidden!": { + Doc: "Set *widget.GridWrap Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//hidden!: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.GridWrap)//hidden?": { + Doc: "Get *widget.GridWrap Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//hidden?: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.GridWrap) + "Go(*widget.GridWrap)//hide": { + Doc: "(*widget.GridWrap).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//hide: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * length - fn { } -> integer + // Result: + // * fn { } -> integer + "Go(*widget.GridWrap)//length!": { + Doc: "Set *widget.GridWrap Length value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//length!: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//length!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//length!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() int + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//length!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.GridWrap)//length!: arg 2: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//length!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//length!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.Length = newVal + return arg0 + }, + }, + // Result: + // * fn { } -> integer + "Go(*widget.GridWrap)//length?": { + Doc: "Get *widget.GridWrap Length value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//length?: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//length?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//length?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := self.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, 0, false, false, "Returned func") + return resObj + }, + }, + // min-size returns the size that this widget should not shrink below. + // + // Args: + // * recv - Go(*widget.GridWrap) + // Result: + // * Go(fyne.Size) + "Go(*widget.GridWrap)//min-size": { + Doc: "(*widget.GridWrap).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//min-size: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.GridWrap) + // * pos - Go(fyne.Position) + "Go(*widget.GridWrap)//move": { + Doc: "(*widget.GridWrap).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//move: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-selected - fn { integer } + // Result: + // * fn { integer } + "Go(*widget.GridWrap)//on-selected!": { + Doc: "Set *widget.GridWrap OnSelected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-selected!: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-selected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-selected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.GridWrapItemID) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-selected!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.GridWrapItemID) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(int(farg0))) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-selected!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-selected!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnSelected = newVal + return arg0 + }, + }, + // Result: + // * fn { integer } + "Go(*widget.GridWrap)//on-selected?": { + Doc: "Get *widget.GridWrap OnSelected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-selected?: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-selected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-selected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.GridWrapItemID + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal widget.GridWrapItemID + if natOk { + natVal, natValOk = nat.Value.(widget.GridWrapItemID) + } + if natValOk { + arg0Val = natVal + } else { + var u int + if vc, ok := arg0.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-selected?: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = widget.GridWrapItemID(u) + } + } + self.OnSelected(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-unselected - fn { integer } + // Result: + // * fn { integer } + "Go(*widget.GridWrap)//on-unselected!": { + Doc: "Set *widget.GridWrap OnUnselected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-unselected!: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-unselected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-unselected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.GridWrapItemID) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-unselected!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.GridWrapItemID) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(int(farg0))) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-unselected!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-unselected!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnUnselected = newVal + return arg0 + }, + }, + // Result: + // * fn { integer } + "Go(*widget.GridWrap)//on-unselected?": { + Doc: "Get *widget.GridWrap OnUnselected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-unselected?: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-unselected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-unselected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.GridWrapItemID + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal widget.GridWrapItemID + if natOk { + natVal, natValOk = nat.Value.(widget.GridWrapItemID) + } + if natValOk { + arg0Val = natVal + } else { + var u int + if vc, ok := arg0.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//on-unselected?: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = widget.GridWrapItemID(u) + } + } + self.OnUnselected(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.GridWrap) + // Result: + // * Go(fyne.position) + "Go(*widget.GridWrap)//position": { + Doc: "(*widget.GridWrap).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//position: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.GridWrap) + "Go(*widget.GridWrap)//refresh": { + Doc: "(*widget.GridWrap).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//refresh: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // refresh-item refreshes a single item, specified by the item ID passed in. + // + // Since: 2.4 + // + // Args: + // * recv - Go(*widget.GridWrap) + // * id - integer + "Go(*widget.GridWrap)//refresh-item": { + Doc: "(*widget.GridWrap).RefreshItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//refresh-item: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//refresh-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//refresh-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.GridWrapItemID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.GridWrapItemID + if natOk { + natVal, natValOk = nat.Value.(widget.GridWrapItemID) + } + if natValOk { + arg1Val = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//refresh-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.GridWrapItemID(u) + } + } + arg0Val.RefreshItem(arg1Val) + return arg0 + }, + }, + // resize is called when this GridWrap should change size. We refresh to ensure invisible items are drawn. + // + // Args: + // * recv - Go(*widget.GridWrap) + // * s - Go(fyne.Size) + "Go(*widget.GridWrap)//resize": { + Doc: "(*widget.GridWrap).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//resize: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // scroll-to scrolls to the item represented by id + // + // Args: + // * recv - Go(*widget.GridWrap) + // * id - integer + "Go(*widget.GridWrap)//scroll-to": { + Doc: "(*widget.GridWrap).ScrollTo", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//scroll-to: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//scroll-to: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//scroll-to: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.GridWrapItemID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.GridWrapItemID + if natOk { + natVal, natValOk = nat.Value.(widget.GridWrapItemID) + } + if natValOk { + arg1Val = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//scroll-to: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.GridWrapItemID(u) + } + } + arg0Val.ScrollTo(arg1Val) + return arg0 + }, + }, + // scroll-to-bottom scrolls to the end of the list + // + // Args: + // * recv - Go(*widget.GridWrap) + "Go(*widget.GridWrap)//scroll-to-bottom": { + Doc: "(*widget.GridWrap).ScrollToBottom", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//scroll-to-bottom: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//scroll-to-bottom: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//scroll-to-bottom: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ScrollToBottom() + return arg0 + }, + }, + // scroll-to-offset scrolls the list to the given offset position + // + // Args: + // * recv - Go(*widget.GridWrap) + // * offset - decimal + "Go(*widget.GridWrap)//scroll-to-offset": { + Doc: "(*widget.GridWrap).ScrollToOffset", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//scroll-to-offset: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//scroll-to-offset: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//scroll-to-offset: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float32 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//scroll-to-offset: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.ScrollToOffset(arg1Val) + return arg0 + }, + }, + // scroll-to-top scrolls to the start of the list + // + // Args: + // * recv - Go(*widget.GridWrap) + "Go(*widget.GridWrap)//scroll-to-top": { + Doc: "(*widget.GridWrap).ScrollToTop", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//scroll-to-top: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//scroll-to-top: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//scroll-to-top: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ScrollToTop() + return arg0 + }, + }, + // select adds the item identified by the given ID to the selection. + // + // Args: + // * recv - Go(*widget.GridWrap) + // * id - integer + "Go(*widget.GridWrap)//select": { + Doc: "(*widget.GridWrap).Select", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//select: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//select: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//select: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.GridWrapItemID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.GridWrapItemID + if natOk { + natVal, natValOk = nat.Value.(widget.GridWrapItemID) + } + if natValOk { + arg1Val = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//select: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.GridWrapItemID(u) + } + } + arg0Val.Select(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.GridWrap) + "Go(*widget.GridWrap)//show": { + Doc: "(*widget.GridWrap).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//show: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.GridWrap) + // Result: + // * Go(fyne.size) + "Go(*widget.GridWrap)//size": { + Doc: "(*widget.GridWrap).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//size: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.GridWrap) + // Result: + // * Go(fyne.theme) + "Go(*widget.GridWrap)//theme": { + Doc: "(*widget.GridWrap).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//theme: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // typed-key is called if a key event happens while this GridWrap is focused. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.GridWrap) + // * event - Go(*fyne.KeyEvent) + "Go(*widget.GridWrap)//typed-key": { + Doc: "(*widget.GridWrap).TypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//typed-key: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//typed-key: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//typed-key: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedKey(arg1Val) + return arg0 + }, + }, + // typed-rune is called if a text event happens while this GridWrap is focused. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.GridWrap) + // * - - Go(rune) + "Go(*widget.GridWrap)//typed-rune": { + Doc: "(*widget.GridWrap).TypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//typed-rune: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//typed-rune: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//typed-rune: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedRune(arg1Val) + return arg0 + }, + }, + // unselect removes the item identified by the given ID from the selection. + // + // Args: + // * recv - Go(*widget.GridWrap) + // * id - integer + "Go(*widget.GridWrap)//unselect": { + Doc: "(*widget.GridWrap).Unselect", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//unselect: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//unselect: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//unselect: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.GridWrapItemID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.GridWrapItemID + if natOk { + natVal, natValOk = nat.Value.(widget.GridWrapItemID) + } + if natValOk { + arg1Val = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//unselect: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.GridWrapItemID(u) + } + } + arg0Val.Unselect(arg1Val) + return arg0 + }, + }, + // unselect-all removes all items from the selection. + // + // Args: + // * recv - Go(*widget.GridWrap) + "Go(*widget.GridWrap)//unselect-all": { + Doc: "(*widget.GridWrap).UnselectAll", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//unselect-all: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//unselect-all: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//unselect-all: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.UnselectAll() + return arg0 + }, + }, + // Args: + // * update-item - fn { integer Go(fyne.CanvasObject) } + // Result: + // * fn { integer Go(fyne.CanvasObject) } + "Go(*widget.GridWrap)//update-item!": { + Doc: "Set *widget.GridWrap UpdateItem value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//update-item!: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//update-item!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//update-item!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.GridWrapItemID, fyne.CanvasObject) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//update-item!: arg 2: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.GridWrapItemID, farg1 fyne.CanvasObject) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(int(farg0))) + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//update-item!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//update-item!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.UpdateItem = newVal + return arg0 + }, + }, + // Result: + // * fn { integer Go(fyne.CanvasObject) } + "Go(*widget.GridWrap)//update-item?": { + Doc: "Get *widget.GridWrap UpdateItem value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//update-item?: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//update-item?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//update-item?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.GridWrapItemID + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal widget.GridWrapItemID + if natOk { + natVal, natValOk = nat.Value.(widget.GridWrapItemID) + } + if natValOk { + arg0Val = natVal + } else { + var u int + if vc, ok := arg0.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//update-item?: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = widget.GridWrapItemID(u) + } + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//update-item?: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//update-item?: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//update-item?: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//update-item?: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.UpdateItem(arg0Val, arg1Val) + return nil + }, 2, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.GridWrap) + // Result: + // * bool + "Go(*widget.GridWrap)//visible": { + Doc: "(*widget.GridWrap).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.GridWrap + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.GridWrap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//visible: arg 1: " + "expected native of type *widget.GridWrap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.GridWrap)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * alignment - integer + // Result: + // * integer + "Go(*widget.Hyperlink)//alignment!": { + Doc: "Set *widget.Hyperlink Alignment value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//alignment!: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//alignment!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//alignment!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.TextAlign + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextAlign + if natOk { + natVal, natValOk = nat.Value.(fyne.TextAlign) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//alignment!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.TextAlign(u) + } + } + self.Alignment = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Hyperlink)//alignment?": { + Doc: "Get *widget.Hyperlink Alignment value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//alignment?: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//alignment?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//alignment?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Alignment))) + return resObj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Hyperlink)//base-widget!": { + Doc: "Set *widget.Hyperlink BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//base-widget!: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Hyperlink)//base-widget?": { + Doc: "Get *widget.Hyperlink BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//base-widget?: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.Hyperlink) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Hyperlink)//create-renderer": { + Doc: "(*widget.Hyperlink).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//create-renderer: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // cursor returns the cursor type of this widget + // + // Args: + // * recv - Go(*widget.Hyperlink) + // Result: + // * Go(desktop.cursor) + "Go(*widget.Hyperlink)//cursor": { + Doc: "(*widget.Hyperlink).Cursor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//cursor: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//cursor: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//cursor: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Cursor() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(desktop.Cursor)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Hyperlink) + // * wid - Go(fyne.Widget) + "Go(*widget.Hyperlink)//extend-base-widget": { + Doc: "(*widget.Hyperlink).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//extend-base-widget: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // focus-gained is a hook called by the focus handling logic after this object gained the focus. + // + // Args: + // * recv - Go(*widget.Hyperlink) + "Go(*widget.Hyperlink)//focus-gained": { + Doc: "(*widget.Hyperlink).FocusGained", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//focus-gained: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//focus-gained: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//focus-gained: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusGained() + return arg0 + }, + }, + // focus-lost is a hook called by the focus handling logic after this object lost the focus. + // + // Args: + // * recv - Go(*widget.Hyperlink) + "Go(*widget.Hyperlink)//focus-lost": { + Doc: "(*widget.Hyperlink).FocusLost", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//focus-lost: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//focus-lost: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//focus-lost: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusLost() + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Hyperlink)//hidden!": { + Doc: "Set *widget.Hyperlink Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//hidden!: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Hyperlink)//hidden?": { + Doc: "Get *widget.Hyperlink Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//hidden?: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Hyperlink) + "Go(*widget.Hyperlink)//hide": { + Doc: "(*widget.Hyperlink).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//hide: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size returns the smallest size this widget can shrink to + // + // Args: + // * recv - Go(*widget.Hyperlink) + // Result: + // * Go(fyne.Size) + "Go(*widget.Hyperlink)//min-size": { + Doc: "(*widget.Hyperlink).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//min-size: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // mouse-in is a hook that is called if the mouse pointer enters the element. + // + // Args: + // * recv - Go(*widget.Hyperlink) + // * e - Go(*desktop.MouseEvent) + "Go(*widget.Hyperlink)//mouse-in": { + Doc: "(*widget.Hyperlink).MouseIn", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//mouse-in: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//mouse-in: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//mouse-in: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//mouse-in: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//mouse-in: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//mouse-in: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseIn(arg1Val) + return arg0 + }, + }, + // mouse-moved is a hook that is called if the mouse pointer moved over the element. + // + // Args: + // * recv - Go(*widget.Hyperlink) + // * e - Go(*desktop.MouseEvent) + "Go(*widget.Hyperlink)//mouse-moved": { + Doc: "(*widget.Hyperlink).MouseMoved", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//mouse-moved: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//mouse-moved: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//mouse-moved: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//mouse-moved: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//mouse-moved: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//mouse-moved: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseMoved(arg1Val) + return arg0 + }, + }, + // mouse-out is a hook that is called if the mouse pointer leaves the element. + // + // Args: + // * recv - Go(*widget.Hyperlink) + "Go(*widget.Hyperlink)//mouse-out": { + Doc: "(*widget.Hyperlink).MouseOut", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//mouse-out: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//mouse-out: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//mouse-out: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseOut() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Hyperlink) + // * pos - Go(fyne.Position) + "Go(*widget.Hyperlink)//move": { + Doc: "(*widget.Hyperlink).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//move: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-tapped - fn { } + // Result: + // * fn { } + "Go(*widget.Hyperlink)//on-tapped!": { + Doc: "Set *widget.Hyperlink OnTapped value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//on-tapped!: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//on-tapped!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//on-tapped!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//on-tapped!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//on-tapped!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//on-tapped!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnTapped = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*widget.Hyperlink)//on-tapped?": { + Doc: "Get *widget.Hyperlink OnTapped value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//on-tapped?: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//on-tapped?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//on-tapped?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.OnTapped() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Hyperlink) + // Result: + // * Go(fyne.position) + "Go(*widget.Hyperlink)//position": { + Doc: "(*widget.Hyperlink).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//position: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // refresh triggers a redraw of the hyperlink. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.Hyperlink) + "Go(*widget.Hyperlink)//refresh": { + Doc: "(*widget.Hyperlink).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//refresh: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize sets a new size for the hyperlink. + // Note this should not be used if the widget is being managed by a Layout within a Container. + // + // Args: + // * recv - Go(*widget.Hyperlink) + // * size - Go(fyne.Size) + "Go(*widget.Hyperlink)//resize": { + Doc: "(*widget.Hyperlink).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//resize: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // set-text sets the text of the hyperlink + // + // Args: + // * recv - Go(*widget.Hyperlink) + // * text - string + "Go(*widget.Hyperlink)//set-text": { + Doc: "(*widget.Hyperlink).SetText", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//set-text: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//set-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//set-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//set-text: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetText(arg1Val) + return arg0 + }, + }, + // set-url sets the URL of the hyperlink, taking in a URL type + // + // Args: + // * recv - Go(*widget.Hyperlink) + // * url - *Go(url.URL) + "Go(*widget.Hyperlink)//set-url": { + Doc: "(*widget.Hyperlink).SetURL", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//set-url: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//set-url: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//set-url: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *url.URL + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*url.URL); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//set-url: arg 2: " + "expected native of type *url.URL, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//set-url: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//set-url: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetURL(arg1Val) + return arg0 + }, + }, + // set-url-from-string sets the URL of the hyperlink, taking in a string type + // + // Args: + // * recv - Go(*widget.Hyperlink) + // * str - string + // Result: + // * error + "Go(*widget.Hyperlink)//set-url-from-string": { + Doc: "(*widget.Hyperlink).SetURLFromString", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//set-url-from-string: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//set-url-from-string: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//set-url-from-string: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//set-url-from-string: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.SetURLFromString(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Hyperlink) + "Go(*widget.Hyperlink)//show": { + Doc: "(*widget.Hyperlink).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//show: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Hyperlink) + // Result: + // * Go(fyne.size) + "Go(*widget.Hyperlink)//size": { + Doc: "(*widget.Hyperlink).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//size: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * size-name - string + // Result: + // * string + "Go(*widget.Hyperlink)//size-name!": { + Doc: "Set *widget.Hyperlink SizeName value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//size-name!: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//size-name!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//size-name!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.ThemeSizeName + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.ThemeSizeName + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeSizeName) + } + if natValOk { + newVal = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//size-name!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.ThemeSizeName(u) + } + } + self.SizeName = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.Hyperlink)//size-name?": { + Doc: "Get *widget.Hyperlink SizeName value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//size-name?: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//size-name?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//size-name?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(string(self.SizeName)) + return resObj + }, + }, + // tapped is called when a pointer tapped event is captured and triggers any change handler + // + // Args: + // * recv - Go(*widget.Hyperlink) + // * e - Go(*fyne.PointEvent) + "Go(*widget.Hyperlink)//tapped": { + Doc: "(*widget.Hyperlink).Tapped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//tapped: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//tapped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//tapped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//tapped: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//tapped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//tapped: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Tapped(arg1Val) + return arg0 + }, + }, + // Args: + // * text - string + // Result: + // * string + "Go(*widget.Hyperlink)//text!": { + Doc: "Set *widget.Hyperlink Text value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text!: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Text = newVal + return arg0 + }, + }, + // Args: + // * text-style - Go(fyne.TextStyle) + // Result: + // * Go(fyne.TextStyle) + "Go(*widget.Hyperlink)//text-style!": { + Doc: "Set *widget.Hyperlink TextStyle value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text-style!: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text-style!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text-style!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.TextStyle + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text-style!: arg 2: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text-style!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text-style!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.TextStyle = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.TextStyle) + "Go(*widget.Hyperlink)//text-style?": { + Doc: "Get *widget.Hyperlink TextStyle value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text-style?: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text-style?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text-style?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.TextStyle, "Go(*fyne.TextStyle)") + return resObj + }, + }, + // Result: + // * string + "Go(*widget.Hyperlink)//text?": { + Doc: "Get *widget.Hyperlink Text value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text?: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//text?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Text) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Hyperlink) + // Result: + // * Go(fyne.theme) + "Go(*widget.Hyperlink)//theme": { + Doc: "(*widget.Hyperlink).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//theme: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * truncation - integer + // Result: + // * integer + "Go(*widget.Hyperlink)//truncation!": { + Doc: "Set *widget.Hyperlink Truncation value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//truncation!: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//truncation!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//truncation!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.TextTruncation + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextTruncation + if natOk { + natVal, natValOk = nat.Value.(fyne.TextTruncation) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//truncation!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.TextTruncation(u) + } + } + self.Truncation = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Hyperlink)//truncation?": { + Doc: "Get *widget.Hyperlink Truncation value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//truncation?: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//truncation?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//truncation?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Truncation))) + return resObj + }, + }, + // typed-key is a hook called by the input handling logic on key events if this object is focused. + // + // Args: + // * recv - Go(*widget.Hyperlink) + // * ev - Go(*fyne.KeyEvent) + "Go(*widget.Hyperlink)//typed-key": { + Doc: "(*widget.Hyperlink).TypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//typed-key: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//typed-key: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//typed-key: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedKey(arg1Val) + return arg0 + }, + }, + // typed-rune is a hook called by the input handling logic on text input events if this object is focused. + // + // Args: + // * recv - Go(*widget.Hyperlink) + // * 1 - Go(rune) + "Go(*widget.Hyperlink)//typed-rune": { + Doc: "(*widget.Hyperlink).TypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//typed-rune: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//typed-rune: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//typed-rune: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedRune(arg1Val) + return arg0 + }, + }, + // Args: + // * url - *Go(url.URL) + // Result: + // * *Go(url.URL) + "Go(*widget.Hyperlink)//url!": { + Doc: "Set *widget.Hyperlink URL value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//url!: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//url!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//url!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *url.URL + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*url.URL); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//url!: arg 2: " + "expected native of type *url.URL, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//url!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//url!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.URL = newVal + return arg0 + }, + }, + // Result: + // * *Go(url.URL) + "Go(*widget.Hyperlink)//url?": { + Doc: "Get *widget.Hyperlink URL value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//url?: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//url?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//url?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.URL, "Go(*url.URL)") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Hyperlink) + // Result: + // * bool + "Go(*widget.Hyperlink)//visible": { + Doc: "(*widget.Hyperlink).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//visible: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * wrapping - integer + // Result: + // * integer + "Go(*widget.Hyperlink)//wrapping!": { + Doc: "Set *widget.Hyperlink Wrapping value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//wrapping!: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//wrapping!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//wrapping!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.TextWrap + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextWrap + if natOk { + natVal, natValOk = nat.Value.(fyne.TextWrap) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//wrapping!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.TextWrap(u) + } + } + self.Wrapping = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Hyperlink)//wrapping?": { + Doc: "Get *widget.Hyperlink Wrapping value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Hyperlink + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Hyperlink); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//wrapping?: arg 1: " + "expected native of type *widget.Hyperlink, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//wrapping?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Hyperlink)//wrapping?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Wrapping))) + return resObj + }, + }, + // Args: + // * alignment - integer + // Result: + // * integer + "Go(*widget.HyperlinkSegment)//alignment!": { + Doc: "Set *widget.HyperlinkSegment Alignment value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.HyperlinkSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.HyperlinkSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//alignment!: arg 1: " + "expected native of type *widget.HyperlinkSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//alignment!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//alignment!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.TextAlign + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextAlign + if natOk { + natVal, natValOk = nat.Value.(fyne.TextAlign) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//alignment!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.TextAlign(u) + } + } + self.Alignment = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.HyperlinkSegment)//alignment?": { + Doc: "Get *widget.HyperlinkSegment Alignment value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.HyperlinkSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.HyperlinkSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//alignment?: arg 1: " + "expected native of type *widget.HyperlinkSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//alignment?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//alignment?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Alignment))) + return resObj + }, + }, + // inline returns true as hyperlinks are inside other elements. + // + // Args: + // * recv - Go(*widget.HyperlinkSegment) + // Result: + // * bool + "Go(*widget.HyperlinkSegment)//inline": { + Doc: "(*widget.HyperlinkSegment).Inline", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.HyperlinkSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.HyperlinkSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//inline: arg 1: " + "expected native of type *widget.HyperlinkSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//inline: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//inline: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Inline() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * on-tapped - fn { } + // Result: + // * fn { } + "Go(*widget.HyperlinkSegment)//on-tapped!": { + Doc: "Set *widget.HyperlinkSegment OnTapped value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.HyperlinkSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.HyperlinkSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//on-tapped!: arg 1: " + "expected native of type *widget.HyperlinkSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//on-tapped!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//on-tapped!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//on-tapped!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//on-tapped!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//on-tapped!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnTapped = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*widget.HyperlinkSegment)//on-tapped?": { + Doc: "Get *widget.HyperlinkSegment OnTapped value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.HyperlinkSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.HyperlinkSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//on-tapped?: arg 1: " + "expected native of type *widget.HyperlinkSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//on-tapped?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//on-tapped?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.OnTapped() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // select tells the segment that the user is selecting the content between the two positions. + // + // Args: + // * recv - Go(*widget.HyperlinkSegment) + // * begin - Go(fyne.Position) + // * end - Go(fyne.Position) + "Go(*widget.HyperlinkSegment)//select": { + Doc: "(*widget.HyperlinkSegment).Select", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.HyperlinkSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.HyperlinkSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//select: arg 1: " + "expected native of type *widget.HyperlinkSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//select: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//select: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//select: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//select: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Position + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//select: arg 3: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//select: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Select(arg1Val, arg2Val) + return arg0 + }, + }, + // selected-text should return the text representation of any content currently selected through the Select call. + // + // Args: + // * recv - Go(*widget.HyperlinkSegment) + // Result: + // * string + "Go(*widget.HyperlinkSegment)//selected-text": { + Doc: "(*widget.HyperlinkSegment).SelectedText", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.HyperlinkSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.HyperlinkSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//selected-text: arg 1: " + "expected native of type *widget.HyperlinkSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//selected-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//selected-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.SelectedText() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * text - string + // Result: + // * string + "Go(*widget.HyperlinkSegment)//text!": { + Doc: "Set *widget.HyperlinkSegment Text value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.HyperlinkSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.HyperlinkSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//text!: arg 1: " + "expected native of type *widget.HyperlinkSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//text!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//text!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//text!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Text = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.HyperlinkSegment)//text?": { + Doc: "Get *widget.HyperlinkSegment Text value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.HyperlinkSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.HyperlinkSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//text?: arg 1: " + "expected native of type *widget.HyperlinkSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//text?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//text?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Text) + return resObj + }, + }, + // textual returns the content of this segment rendered to plain text. + // + // Args: + // * recv - Go(*widget.HyperlinkSegment) + // Result: + // * string + "Go(*widget.HyperlinkSegment)//textual": { + Doc: "(*widget.HyperlinkSegment).Textual", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.HyperlinkSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.HyperlinkSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//textual: arg 1: " + "expected native of type *widget.HyperlinkSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//textual: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//textual: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Textual() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // unselect tells the segment that the user is has cancelled the previous selection. + // + // Args: + // * recv - Go(*widget.HyperlinkSegment) + "Go(*widget.HyperlinkSegment)//unselect": { + Doc: "(*widget.HyperlinkSegment).Unselect", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.HyperlinkSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.HyperlinkSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//unselect: arg 1: " + "expected native of type *widget.HyperlinkSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//unselect: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//unselect: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unselect() + return arg0 + }, + }, + // update applies the current state of this hyperlink segment to an existing visual. + // + // Args: + // * recv - Go(*widget.HyperlinkSegment) + // * o - Go(fyne.CanvasObject) + "Go(*widget.HyperlinkSegment)//update": { + Doc: "(*widget.HyperlinkSegment).Update", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.HyperlinkSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.HyperlinkSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//update: arg 1: " + "expected native of type *widget.HyperlinkSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//update: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//update: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//update: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//update: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//update: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//update: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Update(arg1Val) + return arg0 + }, + }, + // Args: + // * url - *Go(url.URL) + // Result: + // * *Go(url.URL) + "Go(*widget.HyperlinkSegment)//url!": { + Doc: "Set *widget.HyperlinkSegment URL value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.HyperlinkSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.HyperlinkSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//url!: arg 1: " + "expected native of type *widget.HyperlinkSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//url!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//url!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *url.URL + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*url.URL); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//url!: arg 2: " + "expected native of type *url.URL, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//url!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//url!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.URL = newVal + return arg0 + }, + }, + // Result: + // * *Go(url.URL) + "Go(*widget.HyperlinkSegment)//url?": { + Doc: "Get *widget.HyperlinkSegment URL value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.HyperlinkSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.HyperlinkSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//url?: arg 1: " + "expected native of type *widget.HyperlinkSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//url?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//url?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.URL, "Go(*url.URL)") + return resObj + }, + }, + // visual returns the hyperlink widget required to render this segment. + // + // Args: + // * recv - Go(*widget.HyperlinkSegment) + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.HyperlinkSegment)//visual": { + Doc: "(*widget.HyperlinkSegment).Visual", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.HyperlinkSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.HyperlinkSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//visual: arg 1: " + "expected native of type *widget.HyperlinkSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//visual: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.HyperlinkSegment)//visual: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visual() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Icon)//base-widget!": { + Doc: "Set *widget.Icon BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//base-widget!: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Icon)//base-widget?": { + Doc: "Get *widget.Icon BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//base-widget?: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.Icon) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Icon)//create-renderer": { + Doc: "(*widget.Icon).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//create-renderer: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Icon) + // * wid - Go(fyne.Widget) + "Go(*widget.Icon)//extend-base-widget": { + Doc: "(*widget.Icon).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//extend-base-widget: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Icon)//hidden!": { + Doc: "Set *widget.Icon Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//hidden!: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Icon)//hidden?": { + Doc: "Get *widget.Icon Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//hidden?: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Icon) + "Go(*widget.Icon)//hide": { + Doc: "(*widget.Icon).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//hide: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Args: + // * recv - Go(*widget.Icon) + // Result: + // * Go(fyne.Size) + "Go(*widget.Icon)//min-size": { + Doc: "(*widget.Icon).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//min-size: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Icon) + // * pos - Go(fyne.Position) + "Go(*widget.Icon)//move": { + Doc: "(*widget.Icon).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//move: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Icon) + // Result: + // * Go(fyne.position) + "Go(*widget.Icon)//position": { + Doc: "(*widget.Icon).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//position: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Icon) + "Go(*widget.Icon)//refresh": { + Doc: "(*widget.Icon).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//refresh: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Icon) + // * size - Go(fyne.Size) + "Go(*widget.Icon)//resize": { + Doc: "(*widget.Icon).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//resize: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * resource - Go(fyne.Resource) + // Result: + // * Go(fyne.Resource) + "Go(*widget.Icon)//resource!": { + Doc: "Set *widget.Icon Resource value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//resource!: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//resource!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//resource!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//resource!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//resource!: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//resource!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//resource!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Resource = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Resource) + "Go(*widget.Icon)//resource?": { + Doc: "Get *widget.Icon Resource value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//resource?: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//resource?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//resource?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Resource, "Go(fyne.Resource)") + return resObj + }, + }, + // set-resource updates the resource rendered in this icon widget + // + // Args: + // * recv - Go(*widget.Icon) + // * res - Go(fyne.Resource) + "Go(*widget.Icon)//set-resource": { + Doc: "(*widget.Icon).SetResource", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//set-resource: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//set-resource: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//set-resource: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//set-resource: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//set-resource: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//set-resource: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//set-resource: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetResource(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Icon) + "Go(*widget.Icon)//show": { + Doc: "(*widget.Icon).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//show: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Icon) + // Result: + // * Go(fyne.size) + "Go(*widget.Icon)//size": { + Doc: "(*widget.Icon).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//size: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Icon) + // Result: + // * Go(fyne.theme) + "Go(*widget.Icon)//theme": { + Doc: "(*widget.Icon).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//theme: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Icon) + // Result: + // * bool + "Go(*widget.Icon)//visible": { + Doc: "(*widget.Icon).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Icon + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Icon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//visible: arg 1: " + "expected native of type *widget.Icon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Icon)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * alignment - integer + // Result: + // * integer + "Go(*widget.ImageSegment)//alignment!": { + Doc: "Set *widget.ImageSegment Alignment value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ImageSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ImageSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//alignment!: arg 1: " + "expected native of type *widget.ImageSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//alignment!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//alignment!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.TextAlign + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextAlign + if natOk { + natVal, natValOk = nat.Value.(fyne.TextAlign) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//alignment!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.TextAlign(u) + } + } + self.Alignment = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.ImageSegment)//alignment?": { + Doc: "Get *widget.ImageSegment Alignment value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ImageSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ImageSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//alignment?: arg 1: " + "expected native of type *widget.ImageSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//alignment?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//alignment?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Alignment))) + return resObj + }, + }, + // inline returns false as images in rich text are blocks. + // + // Args: + // * recv - Go(*widget.ImageSegment) + // Result: + // * bool + "Go(*widget.ImageSegment)//inline": { + Doc: "(*widget.ImageSegment).Inline", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ImageSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ImageSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//inline: arg 1: " + "expected native of type *widget.ImageSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//inline: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//inline: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Inline() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // select tells the segment that the user is selecting the content between the two positions. + // + // Args: + // * recv - Go(*widget.ImageSegment) + // * begin - Go(fyne.Position) + // * end - Go(fyne.Position) + "Go(*widget.ImageSegment)//select": { + Doc: "(*widget.ImageSegment).Select", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ImageSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ImageSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//select: arg 1: " + "expected native of type *widget.ImageSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//select: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//select: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//select: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//select: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Position + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//select: arg 3: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//select: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Select(arg1Val, arg2Val) + return arg0 + }, + }, + // selected-text should return the text representation of any content currently selected through the Select call. + // + // Args: + // * recv - Go(*widget.ImageSegment) + // Result: + // * string + "Go(*widget.ImageSegment)//selected-text": { + Doc: "(*widget.ImageSegment).SelectedText", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ImageSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ImageSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//selected-text: arg 1: " + "expected native of type *widget.ImageSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//selected-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//selected-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.SelectedText() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * source - Go(fyne.URI) + // Result: + // * Go(fyne.URI) + "Go(*widget.ImageSegment)//source!": { + Doc: "Set *widget.ImageSegment Source value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ImageSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ImageSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//source!: arg 1: " + "expected native of type *widget.ImageSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//source!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//source!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//source!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//source!: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//source!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//source!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Source = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.URI) + "Go(*widget.ImageSegment)//source?": { + Doc: "Get *widget.ImageSegment Source value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ImageSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ImageSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//source?: arg 1: " + "expected native of type *widget.ImageSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//source?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//source?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Source, "Go(fyne.URI)") + return resObj + }, + }, + // textual returns the content of this segment rendered to plain text. + // + // Args: + // * recv - Go(*widget.ImageSegment) + // Result: + // * string + "Go(*widget.ImageSegment)//textual": { + Doc: "(*widget.ImageSegment).Textual", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ImageSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ImageSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//textual: arg 1: " + "expected native of type *widget.ImageSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//textual: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//textual: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Textual() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * title - string + // Result: + // * string + "Go(*widget.ImageSegment)//title!": { + Doc: "Set *widget.ImageSegment Title value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ImageSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ImageSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//title!: arg 1: " + "expected native of type *widget.ImageSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//title!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//title!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//title!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Title = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.ImageSegment)//title?": { + Doc: "Get *widget.ImageSegment Title value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ImageSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ImageSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//title?: arg 1: " + "expected native of type *widget.ImageSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//title?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//title?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Title) + return resObj + }, + }, + // unselect tells the segment that the user is has cancelled the previous selection. + // + // Args: + // * recv - Go(*widget.ImageSegment) + "Go(*widget.ImageSegment)//unselect": { + Doc: "(*widget.ImageSegment).Unselect", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ImageSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ImageSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//unselect: arg 1: " + "expected native of type *widget.ImageSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//unselect: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//unselect: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unselect() + return arg0 + }, + }, + // update applies the current state of this image segment to an existing visual. + // + // Args: + // * recv - Go(*widget.ImageSegment) + // * o - Go(fyne.CanvasObject) + "Go(*widget.ImageSegment)//update": { + Doc: "(*widget.ImageSegment).Update", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ImageSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ImageSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//update: arg 1: " + "expected native of type *widget.ImageSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//update: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//update: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//update: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//update: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//update: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//update: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Update(arg1Val) + return arg0 + }, + }, + // visual returns the image widget required to render this segment. + // + // Args: + // * recv - Go(*widget.ImageSegment) + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.ImageSegment)//visual": { + Doc: "(*widget.ImageSegment).Visual", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ImageSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ImageSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//visual: arg 1: " + "expected native of type *widget.ImageSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//visual: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ImageSegment)//visual: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visual() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // Args: + // * alignment - integer + // Result: + // * integer + "Go(*widget.Label)//alignment!": { + Doc: "Set *widget.Label Alignment value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//alignment!: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//alignment!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//alignment!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.TextAlign + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextAlign + if natOk { + natVal, natValOk = nat.Value.(fyne.TextAlign) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//alignment!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.TextAlign(u) + } + } + self.Alignment = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Label)//alignment?": { + Doc: "Get *widget.Label Alignment value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//alignment?: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//alignment?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//alignment?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Alignment))) + return resObj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Label)//base-widget!": { + Doc: "Set *widget.Label BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//base-widget!: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Label)//base-widget?": { + Doc: "Get *widget.Label BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//base-widget?: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // bind connects the specified data source to this Label. + // The current value will be displayed and any changes in the data will cause the widget to update. + // + // Since: 2.0 + // + // Args: + // * recv - Go(*widget.Label) + // * data - Go(binding.String) + "Go(*widget.Label)//bind": { + Doc: "(*widget.Label).Bind", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//bind: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//bind: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//bind: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.String + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//bind: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//bind: arg 2: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//bind: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//bind: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Bind(arg1Val) + return arg0 + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.Label) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Label)//create-renderer": { + Doc: "(*widget.Label).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//create-renderer: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Label) + // * wid - Go(fyne.Widget) + "Go(*widget.Label)//extend-base-widget": { + Doc: "(*widget.Label).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//extend-base-widget: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Label)//hidden!": { + Doc: "Set *widget.Label Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//hidden!: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Label)//hidden?": { + Doc: "Get *widget.Label Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//hidden?: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Label) + "Go(*widget.Label)//hide": { + Doc: "(*widget.Label).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//hide: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * importance - integer + // Result: + // * integer + "Go(*widget.Label)//importance!": { + Doc: "Set *widget.Label Importance value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//importance!: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//importance!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//importance!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal widget.Importance + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.Importance + if natOk { + natVal, natValOk = nat.Value.(widget.Importance) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//importance!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = widget.Importance(u) + } + } + self.Importance = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Label)//importance?": { + Doc: "Get *widget.Label Importance value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//importance?: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//importance?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//importance?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Importance))) + return resObj + }, + }, + // min-size returns the size that this label should not shrink below. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.Label) + // Result: + // * Go(fyne.Size) + "Go(*widget.Label)//min-size": { + Doc: "(*widget.Label).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//min-size: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Label) + // * pos - Go(fyne.Position) + "Go(*widget.Label)//move": { + Doc: "(*widget.Label).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//move: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Label) + // Result: + // * Go(fyne.position) + "Go(*widget.Label)//position": { + Doc: "(*widget.Label).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//position: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // refresh triggers a redraw of the label. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.Label) + "Go(*widget.Label)//refresh": { + Doc: "(*widget.Label).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//refresh: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize sets a new size for the label. + // This should only be called if it is not in a container with a layout manager. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.Label) + // * s - Go(fyne.Size) + "Go(*widget.Label)//resize": { + Doc: "(*widget.Label).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//resize: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // set-text sets the text of the label + // + // Args: + // * recv - Go(*widget.Label) + // * text - string + "Go(*widget.Label)//set-text": { + Doc: "(*widget.Label).SetText", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//set-text: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//set-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//set-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//set-text: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetText(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Label) + "Go(*widget.Label)//show": { + Doc: "(*widget.Label).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//show: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Label) + // Result: + // * Go(fyne.size) + "Go(*widget.Label)//size": { + Doc: "(*widget.Label).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//size: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * text - string + // Result: + // * string + "Go(*widget.Label)//text!": { + Doc: "Set *widget.Label Text value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text!: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Text = newVal + return arg0 + }, + }, + // Args: + // * text-style - Go(fyne.TextStyle) + // Result: + // * Go(fyne.TextStyle) + "Go(*widget.Label)//text-style!": { + Doc: "Set *widget.Label TextStyle value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text-style!: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text-style!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text-style!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.TextStyle + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text-style!: arg 2: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text-style!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text-style!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.TextStyle = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.TextStyle) + "Go(*widget.Label)//text-style?": { + Doc: "Get *widget.Label TextStyle value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text-style?: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text-style?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text-style?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.TextStyle, "Go(*fyne.TextStyle)") + return resObj + }, + }, + // Result: + // * string + "Go(*widget.Label)//text?": { + Doc: "Get *widget.Label Text value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text?: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//text?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Text) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Label) + // Result: + // * Go(fyne.theme) + "Go(*widget.Label)//theme": { + Doc: "(*widget.Label).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//theme: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * truncation - integer + // Result: + // * integer + "Go(*widget.Label)//truncation!": { + Doc: "Set *widget.Label Truncation value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//truncation!: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//truncation!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//truncation!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.TextTruncation + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextTruncation + if natOk { + natVal, natValOk = nat.Value.(fyne.TextTruncation) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//truncation!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.TextTruncation(u) + } + } + self.Truncation = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Label)//truncation?": { + Doc: "Get *widget.Label Truncation value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//truncation?: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//truncation?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//truncation?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Truncation))) + return resObj + }, + }, + // unbind disconnects any configured data source from this Label. + // The current value will remain at the last value of the data source. + // + // Since: 2.0 + // + // Args: + // * recv - Go(*widget.Label) + "Go(*widget.Label)//unbind": { + Doc: "(*widget.Label).Unbind", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//unbind: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//unbind: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//unbind: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unbind() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Label) + // Result: + // * bool + "Go(*widget.Label)//visible": { + Doc: "(*widget.Label).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//visible: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * wrapping - integer + // Result: + // * integer + "Go(*widget.Label)//wrapping!": { + Doc: "Set *widget.Label Wrapping value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//wrapping!: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//wrapping!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//wrapping!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.TextWrap + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextWrap + if natOk { + natVal, natValOk = nat.Value.(fyne.TextWrap) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//wrapping!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.TextWrap(u) + } + } + self.Wrapping = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Label)//wrapping?": { + Doc: "Get *widget.Label Wrapping value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Label + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Label); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//wrapping?: arg 1: " + "expected native of type *widget.Label, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//wrapping?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Label)//wrapping?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Wrapping))) + return resObj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.List)//base-widget!": { + Doc: "Set *widget.List BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//base-widget!: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.List)//base-widget?": { + Doc: "Get *widget.List BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//base-widget?: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // Args: + // * create-item - fn { } -> Go(fyne.CanvasObject) + // Result: + // * fn { } -> Go(fyne.CanvasObject) + "Go(*widget.List)//create-item!": { + Doc: "Set *widget.List CreateItem value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//create-item!: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//create-item!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//create-item!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() fyne.CanvasObject + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//create-item!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.List)//create-item!: arg 2: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.List)//create-item!: arg 2: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.List)//create-item!: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.List)//create-item!: arg 2: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//create-item!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//create-item!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.CreateItem = newVal + return arg0 + }, + }, + // Result: + // * fn { } -> Go(fyne.CanvasObject) + "Go(*widget.List)//create-item?": { + Doc: "Get *widget.List CreateItem value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//create-item?: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//create-item?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//create-item?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := self.CreateItem() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, 0, false, false, "Returned func") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer. + // + // Args: + // * recv - Go(*widget.List) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.List)//create-renderer": { + Doc: "(*widget.List).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//create-renderer: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.List) + // * wid - Go(fyne.Widget) + "Go(*widget.List)//extend-base-widget": { + Doc: "(*widget.List).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//extend-base-widget: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // focus-gained is called after this List has gained focus. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.List) + "Go(*widget.List)//focus-gained": { + Doc: "(*widget.List).FocusGained", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//focus-gained: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//focus-gained: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//focus-gained: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusGained() + return arg0 + }, + }, + // focus-lost is called after this List has lost focus. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.List) + "Go(*widget.List)//focus-lost": { + Doc: "(*widget.List).FocusLost", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//focus-lost: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//focus-lost: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//focus-lost: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusLost() + return arg0 + }, + }, + // get-scroll-offset returns the current scroll offset position + // + // Since: 2.5 + // + // Args: + // * recv - Go(*widget.List) + // Result: + // * decimal + "Go(*widget.List)//get-scroll-offset": { + Doc: "(*widget.List).GetScrollOffset", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//get-scroll-offset: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//get-scroll-offset: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//get-scroll-offset: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.GetScrollOffset() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.List)//hidden!": { + Doc: "Set *widget.List Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hidden!: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.List)//hidden?": { + Doc: "Get *widget.List Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hidden?: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.List) + "Go(*widget.List)//hide": { + Doc: "(*widget.List).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hide: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * hide-separators - bool + // Result: + // * bool + "Go(*widget.List)//hide-separators!": { + Doc: "Set *widget.List HideSeparators value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hide-separators!: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hide-separators!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hide-separators!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hide-separators!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.HideSeparators = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.List)//hide-separators?": { + Doc: "Get *widget.List HideSeparators value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hide-separators?: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hide-separators?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//hide-separators?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.HideSeparators)) + return resObj + }, + }, + // Args: + // * length - fn { } -> integer + // Result: + // * fn { } -> integer + "Go(*widget.List)//length!": { + Doc: "Set *widget.List Length value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//length!: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//length!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//length!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() int + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//length!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.List)//length!: arg 2: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//length!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//length!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.Length = newVal + return arg0 + }, + }, + // Result: + // * fn { } -> integer + "Go(*widget.List)//length?": { + Doc: "Get *widget.List Length value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//length?: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//length?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//length?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := self.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, 0, false, false, "Returned func") + return resObj + }, + }, + // min-size returns the size that this widget should not shrink below. + // + // Args: + // * recv - Go(*widget.List) + // Result: + // * Go(fyne.Size) + "Go(*widget.List)//min-size": { + Doc: "(*widget.List).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//min-size: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.List) + // * pos - Go(fyne.Position) + "Go(*widget.List)//move": { + Doc: "(*widget.List).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//move: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-selected - fn { integer } + // Result: + // * fn { integer } + "Go(*widget.List)//on-selected!": { + Doc: "Set *widget.List OnSelected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-selected!: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-selected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-selected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.ListItemID) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-selected!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.ListItemID) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(int(farg0))) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-selected!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-selected!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnSelected = newVal + return arg0 + }, + }, + // Result: + // * fn { integer } + "Go(*widget.List)//on-selected?": { + Doc: "Get *widget.List OnSelected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-selected?: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-selected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-selected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.ListItemID + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal widget.ListItemID + if natOk { + natVal, natValOk = nat.Value.(widget.ListItemID) + } + if natValOk { + arg0Val = natVal + } else { + var u int + if vc, ok := arg0.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-selected?: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = widget.ListItemID(u) + } + } + self.OnSelected(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-unselected - fn { integer } + // Result: + // * fn { integer } + "Go(*widget.List)//on-unselected!": { + Doc: "Set *widget.List OnUnselected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-unselected!: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-unselected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-unselected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.ListItemID) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-unselected!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.ListItemID) { + var farg0Val env.Object + farg0Val = *env.NewInteger(int64(int(farg0))) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-unselected!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-unselected!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnUnselected = newVal + return arg0 + }, + }, + // Result: + // * fn { integer } + "Go(*widget.List)//on-unselected?": { + Doc: "Get *widget.List OnUnselected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-unselected?: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-unselected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-unselected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.ListItemID + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal widget.ListItemID + if natOk { + natVal, natValOk = nat.Value.(widget.ListItemID) + } + if natValOk { + arg0Val = natVal + } else { + var u int + if vc, ok := arg0.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//on-unselected?: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = widget.ListItemID(u) + } + } + self.OnUnselected(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.List) + // Result: + // * Go(fyne.position) + "Go(*widget.List)//position": { + Doc: "(*widget.List).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//position: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.List) + "Go(*widget.List)//refresh": { + Doc: "(*widget.List).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//refresh: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // refresh-item refreshes a single item, specified by the item ID passed in. + // + // Since: 2.4 + // + // Args: + // * recv - Go(*widget.List) + // * id - integer + "Go(*widget.List)//refresh-item": { + Doc: "(*widget.List).RefreshItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//refresh-item: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//refresh-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//refresh-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.ListItemID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.ListItemID + if natOk { + natVal, natValOk = nat.Value.(widget.ListItemID) + } + if natValOk { + arg1Val = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//refresh-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.ListItemID(u) + } + } + arg0Val.RefreshItem(arg1Val) + return arg0 + }, + }, + // resize is called when this list should change size. We refresh to ensure invisible items are drawn. + // + // Args: + // * recv - Go(*widget.List) + // * s - Go(fyne.Size) + "Go(*widget.List)//resize": { + Doc: "(*widget.List).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//resize: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // scroll-to scrolls to the item represented by id + // + // Since: 2.1 + // + // Args: + // * recv - Go(*widget.List) + // * id - integer + "Go(*widget.List)//scroll-to": { + Doc: "(*widget.List).ScrollTo", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//scroll-to: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//scroll-to: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//scroll-to: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.ListItemID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.ListItemID + if natOk { + natVal, natValOk = nat.Value.(widget.ListItemID) + } + if natValOk { + arg1Val = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//scroll-to: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.ListItemID(u) + } + } + arg0Val.ScrollTo(arg1Val) + return arg0 + }, + }, + // scroll-to-bottom scrolls to the end of the list + // + // Since: 2.1 + // + // Args: + // * recv - Go(*widget.List) + "Go(*widget.List)//scroll-to-bottom": { + Doc: "(*widget.List).ScrollToBottom", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//scroll-to-bottom: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//scroll-to-bottom: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//scroll-to-bottom: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ScrollToBottom() + return arg0 + }, + }, + // scroll-to-offset scrolls the list to the given offset position. + // + // Since: 2.5 + // + // Args: + // * recv - Go(*widget.List) + // * offset - decimal + "Go(*widget.List)//scroll-to-offset": { + Doc: "(*widget.List).ScrollToOffset", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//scroll-to-offset: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//scroll-to-offset: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//scroll-to-offset: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float32 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//scroll-to-offset: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.ScrollToOffset(arg1Val) + return arg0 + }, + }, + // scroll-to-top scrolls to the start of the list + // + // Since: 2.1 + // + // Args: + // * recv - Go(*widget.List) + "Go(*widget.List)//scroll-to-top": { + Doc: "(*widget.List).ScrollToTop", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//scroll-to-top: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//scroll-to-top: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//scroll-to-top: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ScrollToTop() + return arg0 + }, + }, + // select add the item identified by the given ID to the selection. + // + // Args: + // * recv - Go(*widget.List) + // * id - integer + "Go(*widget.List)//select": { + Doc: "(*widget.List).Select", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//select: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//select: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//select: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.ListItemID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.ListItemID + if natOk { + natVal, natValOk = nat.Value.(widget.ListItemID) + } + if natValOk { + arg1Val = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//select: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.ListItemID(u) + } + } + arg0Val.Select(arg1Val) + return arg0 + }, + }, + // set-item-height supports changing the height of the specified list item. Items normally take the height of the template + // returned from the CreateItem callback. The height parameter uses the same units as a fyne.Size type and refers + // to the internal content height not including the divider size. + // + // Since: 2.3 + // + // Args: + // * recv - Go(*widget.List) + // * id - integer + // * height - decimal + "Go(*widget.List)//set-item-height": { + Doc: "(*widget.List).SetItemHeight", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//set-item-height: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//set-item-height: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//set-item-height: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.ListItemID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.ListItemID + if natOk { + natVal, natValOk = nat.Value.(widget.ListItemID) + } + if natValOk { + arg1Val = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//set-item-height: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.ListItemID(u) + } + } + var arg2Val float32 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//set-item-height: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + arg0Val.SetItemHeight(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.List) + "Go(*widget.List)//show": { + Doc: "(*widget.List).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//show: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.List) + // Result: + // * Go(fyne.size) + "Go(*widget.List)//size": { + Doc: "(*widget.List).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//size: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.List) + // Result: + // * Go(fyne.theme) + "Go(*widget.List)//theme": { + Doc: "(*widget.List).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//theme: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // typed-key is called if a key event happens while this List is focused. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.List) + // * event - Go(*fyne.KeyEvent) + "Go(*widget.List)//typed-key": { + Doc: "(*widget.List).TypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//typed-key: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//typed-key: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//typed-key: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedKey(arg1Val) + return arg0 + }, + }, + // typed-rune is called if a text event happens while this List is focused. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.List) + // * - - Go(rune) + "Go(*widget.List)//typed-rune": { + Doc: "(*widget.List).TypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//typed-rune: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//typed-rune: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//typed-rune: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedRune(arg1Val) + return arg0 + }, + }, + // unselect removes the item identified by the given ID from the selection. + // + // Args: + // * recv - Go(*widget.List) + // * id - integer + "Go(*widget.List)//unselect": { + Doc: "(*widget.List).Unselect", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//unselect: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//unselect: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//unselect: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.ListItemID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.ListItemID + if natOk { + natVal, natValOk = nat.Value.(widget.ListItemID) + } + if natValOk { + arg1Val = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//unselect: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.ListItemID(u) + } + } + arg0Val.Unselect(arg1Val) + return arg0 + }, + }, + // unselect-all removes all items from the selection. + // + // Since: 2.1 + // + // Args: + // * recv - Go(*widget.List) + "Go(*widget.List)//unselect-all": { + Doc: "(*widget.List).UnselectAll", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//unselect-all: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//unselect-all: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//unselect-all: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.UnselectAll() + return arg0 + }, + }, + // Args: + // * update-item - fn { integer Go(fyne.CanvasObject) } + // Result: + // * fn { integer Go(fyne.CanvasObject) } + "Go(*widget.List)//update-item!": { + Doc: "Set *widget.List UpdateItem value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//update-item!: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//update-item!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//update-item!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.ListItemID, fyne.CanvasObject) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//update-item!: arg 2: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.ListItemID, farg1 fyne.CanvasObject) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(int(farg0))) + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//update-item!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//update-item!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.UpdateItem = newVal + return arg0 + }, + }, + // Result: + // * fn { integer Go(fyne.CanvasObject) } + "Go(*widget.List)//update-item?": { + Doc: "Get *widget.List UpdateItem value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//update-item?: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//update-item?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//update-item?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.ListItemID + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal widget.ListItemID + if natOk { + natVal, natValOk = nat.Value.(widget.ListItemID) + } + if natValOk { + arg0Val = natVal + } else { + var u int + if vc, ok := arg0.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//update-item?: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = widget.ListItemID(u) + } + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//update-item?: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//update-item?: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//update-item?: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//update-item?: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.UpdateItem(arg0Val, arg1Val) + return nil + }, 2, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.List) + // Result: + // * bool + "Go(*widget.List)//visible": { + Doc: "(*widget.List).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.List + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.List); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//visible: arg 1: " + "expected native of type *widget.List, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.List)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // inline returns false as a list should be in a block. + // + // Args: + // * recv - Go(*widget.ListSegment) + // Result: + // * bool + "Go(*widget.ListSegment)//inline": { + Doc: "(*widget.ListSegment).Inline", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ListSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ListSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//inline: arg 1: " + "expected native of type *widget.ListSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//inline: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//inline: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Inline() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * items - block[Go(widget.RichTextSegment)] + // Result: + // * block[Go(widget.RichTextSegment)] + "Go(*widget.ListSegment)//items!": { + Doc: "Set *widget.ListSegment Items value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ListSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ListSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//items!: arg 1: " + "expected native of type *widget.ListSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//items!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//items!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []widget.RichTextSegment + switch v := arg1.(type) { + case env.Block: + newVal = make([]widget.RichTextSegment, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_widget_RichTextSegment(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//items!: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.RichTextSegment); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//items!: arg 2: " + "block item: " + "expected native of type widget.RichTextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//items!: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//items!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//items!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//items!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Items = newVal + return arg0 + }, + }, + // Result: + // * block[Go(widget.RichTextSegment)] + "Go(*widget.ListSegment)//items?": { + Doc: "Get *widget.ListSegment Items value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ListSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ListSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//items?: arg 1: " + "expected native of type *widget.ListSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//items?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//items?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Items)) + for i, it := range self.Items { + items[i] = ifaceToNative(ps.Idx, it, "Go(widget.RichTextSegment)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // Args: + // * ordered - bool + // Result: + // * bool + "Go(*widget.ListSegment)//ordered!": { + Doc: "Set *widget.ListSegment Ordered value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ListSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ListSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//ordered!: arg 1: " + "expected native of type *widget.ListSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//ordered!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//ordered!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//ordered!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Ordered = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.ListSegment)//ordered?": { + Doc: "Get *widget.ListSegment Ordered value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ListSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ListSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//ordered?: arg 1: " + "expected native of type *widget.ListSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//ordered?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//ordered?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Ordered)) + return resObj + }, + }, + // segments returns the segments required to draw bullets before each item + // + // Args: + // * recv - Go(*widget.ListSegment) + // Result: + // * block[Go(widget.RichTextSegment)] + "Go(*widget.ListSegment)//segments": { + Doc: "(*widget.ListSegment).Segments", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ListSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ListSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//segments: arg 1: " + "expected native of type *widget.ListSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//segments: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//segments: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Segments() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(widget.RichTextSegment)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // select does nothing for a list container. + // + // Args: + // * recv - Go(*widget.ListSegment) + // * - - Go(fyne.Position) + // * - - Go(fyne.Position) + "Go(*widget.ListSegment)//select": { + Doc: "(*widget.ListSegment).Select", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ListSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ListSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//select: arg 1: " + "expected native of type *widget.ListSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//select: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//select: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//select: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//select: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Position + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//select: arg 3: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//select: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Select(arg1Val, arg2Val) + return arg0 + }, + }, + // selected-text returns the empty string for this list. + // + // Args: + // * recv - Go(*widget.ListSegment) + // Result: + // * string + "Go(*widget.ListSegment)//selected-text": { + Doc: "(*widget.ListSegment).SelectedText", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ListSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ListSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//selected-text: arg 1: " + "expected native of type *widget.ListSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//selected-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//selected-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.SelectedText() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // textual returns no content for a list as the content is in sub-segments. + // + // Args: + // * recv - Go(*widget.ListSegment) + // Result: + // * string + "Go(*widget.ListSegment)//textual": { + Doc: "(*widget.ListSegment).Textual", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ListSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ListSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//textual: arg 1: " + "expected native of type *widget.ListSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//textual: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//textual: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Textual() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // unselect does nothing for a list container. + // + // Args: + // * recv - Go(*widget.ListSegment) + "Go(*widget.ListSegment)//unselect": { + Doc: "(*widget.ListSegment).Unselect", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ListSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ListSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//unselect: arg 1: " + "expected native of type *widget.ListSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//unselect: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//unselect: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unselect() + return arg0 + }, + }, + // update doesnt need to change a list visual. + // + // Args: + // * recv - Go(*widget.ListSegment) + // * 1 - Go(fyne.CanvasObject) + "Go(*widget.ListSegment)//update": { + Doc: "(*widget.ListSegment).Update", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ListSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ListSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//update: arg 1: " + "expected native of type *widget.ListSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//update: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//update: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//update: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//update: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//update: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//update: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Update(arg1Val) + return arg0 + }, + }, + // visual returns no additional elements for this segment. + // + // Args: + // * recv - Go(*widget.ListSegment) + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.ListSegment)//visual": { + Doc: "(*widget.ListSegment).Visual", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ListSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ListSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//visual: arg 1: " + "expected native of type *widget.ListSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//visual: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ListSegment)//visual: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visual() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // activate-last-submenu finds the last active menu item traversing through the open submenus + // and activates its submenu if any. + // It returns `true` if there was a submenu and it was activated and `false` elsewhere. + // Activating a submenu does show it and activate its first item. + // + // Args: + // * recv - Go(*widget.Menu) + // Result: + // * bool + "Go(*widget.Menu)//activate-last-submenu": { + Doc: "(*widget.Menu).ActivateLastSubmenu", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//activate-last-submenu: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//activate-last-submenu: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//activate-last-submenu: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ActivateLastSubmenu() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // activate-next activates the menu item following the currently active menu item. + // If there is no menu item active, it activates the first menu item. + // If there is no menu item after the current active one, it does nothing. + // If a submenu is open, it delegates the activation to this submenu. + // + // Args: + // * recv - Go(*widget.Menu) + "Go(*widget.Menu)//activate-next": { + Doc: "(*widget.Menu).ActivateNext", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//activate-next: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//activate-next: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//activate-next: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ActivateNext() + return arg0 + }, + }, + // activate-previous activates the menu item preceding the currently active menu item. + // If there is no menu item active, it activates the last menu item. + // If there is no menu item before the current active one, it does nothing. + // If a submenu is open, it delegates the activation to this submenu. + // + // Args: + // * recv - Go(*widget.Menu) + "Go(*widget.Menu)//activate-previous": { + Doc: "(*widget.Menu).ActivatePrevious", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//activate-previous: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//activate-previous: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//activate-previous: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ActivatePrevious() + return arg0 + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Menu)//base-widget!": { + Doc: "Set *widget.Menu BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//base-widget!: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Menu)//base-widget?": { + Doc: "Get *widget.Menu BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//base-widget?: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // create-renderer returns a new renderer for the menu. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.Menu) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Menu)//create-renderer": { + Doc: "(*widget.Menu).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//create-renderer: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // deactivate-child deactivates the active menu item and hides its submenu if any. + // + // Args: + // * recv - Go(*widget.Menu) + "Go(*widget.Menu)//deactivate-child": { + Doc: "(*widget.Menu).DeactivateChild", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//deactivate-child: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//deactivate-child: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//deactivate-child: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.DeactivateChild() + return arg0 + }, + }, + // deactivate-last-submenu finds the last open submenu traversing through the open submenus, + // deactivates its active item and hides it. + // This also deactivates any submenus of the deactivated submenu. + // It returns `true` if there was a submenu open and closed and `false` elsewhere. + // + // Args: + // * recv - Go(*widget.Menu) + // Result: + // * bool + "Go(*widget.Menu)//deactivate-last-submenu": { + Doc: "(*widget.Menu).DeactivateLastSubmenu", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//deactivate-last-submenu: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//deactivate-last-submenu: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//deactivate-last-submenu: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.DeactivateLastSubmenu() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // dismiss dismisses the menu by dismissing and hiding the active child and performing Ondismiss. + // + // Args: + // * recv - Go(*widget.Menu) + "Go(*widget.Menu)//dismiss": { + Doc: "(*widget.Menu).Dismiss", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//dismiss: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//dismiss: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//dismiss: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Dismiss() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Menu) + // * wid - Go(fyne.Widget) + "Go(*widget.Menu)//extend-base-widget": { + Doc: "(*widget.Menu).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//extend-base-widget: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Menu)//hidden!": { + Doc: "Set *widget.Menu Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//hidden!: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Menu)//hidden?": { + Doc: "Get *widget.Menu Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//hidden?: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Menu) + "Go(*widget.Menu)//hide": { + Doc: "(*widget.Menu).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//hide: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * items - block[Go(fyne.CanvasObject)] + // Result: + // * block[Go(fyne.CanvasObject)] + "Go(*widget.Menu)//items!": { + Doc: "Set *widget.Menu Items value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//items!: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//items!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//items!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []fyne.CanvasObject + switch v := arg1.(type) { + case env.Block: + newVal = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//items!: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//items!: arg 2: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//items!: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//items!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//items!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//items!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Items = newVal + return arg0 + }, + }, + // Result: + // * block[Go(fyne.CanvasObject)] + "Go(*widget.Menu)//items?": { + Doc: "Get *widget.Menu Items value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//items?: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//items?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//items?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Items)) + for i, it := range self.Items { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.CanvasObject)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // min-size returns the minimal size of the menu. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.Menu) + // Result: + // * Go(fyne.Size) + "Go(*widget.Menu)//min-size": { + Doc: "(*widget.Menu).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//min-size: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Menu) + // * pos - Go(fyne.Position) + "Go(*widget.Menu)//move": { + Doc: "(*widget.Menu).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//move: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-dismiss - fn { } + // Result: + // * fn { } + "Go(*widget.Menu)//on-dismiss!": { + Doc: "Set *widget.Menu OnDismiss value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//on-dismiss!: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//on-dismiss!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//on-dismiss!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//on-dismiss!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//on-dismiss!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//on-dismiss!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnDismiss = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*widget.Menu)//on-dismiss?": { + Doc: "Get *widget.Menu OnDismiss value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//on-dismiss?: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//on-dismiss?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//on-dismiss?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.OnDismiss() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Menu) + // Result: + // * Go(fyne.position) + "Go(*widget.Menu)//position": { + Doc: "(*widget.Menu).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//position: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // refresh updates the menu to reflect changes in the data. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.Menu) + "Go(*widget.Menu)//refresh": { + Doc: "(*widget.Menu).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//refresh: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Menu) + // * size - Go(fyne.Size) + "Go(*widget.Menu)//resize": { + Doc: "(*widget.Menu).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//resize: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Menu) + "Go(*widget.Menu)//show": { + Doc: "(*widget.Menu).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//show: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Menu) + // Result: + // * Go(fyne.size) + "Go(*widget.Menu)//size": { + Doc: "(*widget.Menu).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//size: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // tapped catches taps on separators and the menu background. It doesn't perform any action. + // + // Implements: fyne.Tappable + // + // Args: + // * recv - Go(*widget.Menu) + // * 1 - Go(*fyne.PointEvent) + "Go(*widget.Menu)//tapped": { + Doc: "(*widget.Menu).Tapped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//tapped: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//tapped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//tapped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//tapped: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//tapped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//tapped: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Tapped(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Menu) + // Result: + // * Go(fyne.theme) + "Go(*widget.Menu)//theme": { + Doc: "(*widget.Menu).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//theme: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // trigger-last finds the last active menu item traversing through the open submenus and triggers it. + // + // Args: + // * recv - Go(*widget.Menu) + "Go(*widget.Menu)//trigger-last": { + Doc: "(*widget.Menu).TriggerLast", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//trigger-last: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//trigger-last: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//trigger-last: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TriggerLast() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Menu) + // Result: + // * bool + "Go(*widget.Menu)//visible": { + Doc: "(*widget.Menu).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//visible: arg 1: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Menu)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // inline returns false as a paragraph should be in a block. + // + // Args: + // * recv - Go(*widget.ParagraphSegment) + // Result: + // * bool + "Go(*widget.ParagraphSegment)//inline": { + Doc: "(*widget.ParagraphSegment).Inline", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ParagraphSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ParagraphSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//inline: arg 1: " + "expected native of type *widget.ParagraphSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//inline: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//inline: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Inline() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // segments returns the list of text elements in this paragraph. + // + // Args: + // * recv - Go(*widget.ParagraphSegment) + // Result: + // * block[Go(widget.RichTextSegment)] + "Go(*widget.ParagraphSegment)//segments": { + Doc: "(*widget.ParagraphSegment).Segments", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ParagraphSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ParagraphSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//segments: arg 1: " + "expected native of type *widget.ParagraphSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//segments: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//segments: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Segments() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(widget.RichTextSegment)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // select does nothing for a paragraph container. + // + // Args: + // * recv - Go(*widget.ParagraphSegment) + // * - - Go(fyne.Position) + // * - - Go(fyne.Position) + "Go(*widget.ParagraphSegment)//select": { + Doc: "(*widget.ParagraphSegment).Select", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ParagraphSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ParagraphSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//select: arg 1: " + "expected native of type *widget.ParagraphSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//select: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//select: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//select: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//select: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Position + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//select: arg 3: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//select: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Select(arg1Val, arg2Val) + return arg0 + }, + }, + // selected-text returns the empty string for this paragraph container. + // + // Args: + // * recv - Go(*widget.ParagraphSegment) + // Result: + // * string + "Go(*widget.ParagraphSegment)//selected-text": { + Doc: "(*widget.ParagraphSegment).SelectedText", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ParagraphSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ParagraphSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//selected-text: arg 1: " + "expected native of type *widget.ParagraphSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//selected-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//selected-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.SelectedText() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * texts - block[Go(widget.RichTextSegment)] + // Result: + // * block[Go(widget.RichTextSegment)] + "Go(*widget.ParagraphSegment)//texts!": { + Doc: "Set *widget.ParagraphSegment Texts value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ParagraphSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ParagraphSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//texts!: arg 1: " + "expected native of type *widget.ParagraphSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//texts!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//texts!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []widget.RichTextSegment + switch v := arg1.(type) { + case env.Block: + newVal = make([]widget.RichTextSegment, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_widget_RichTextSegment(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//texts!: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.RichTextSegment); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//texts!: arg 2: " + "block item: " + "expected native of type widget.RichTextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//texts!: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//texts!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//texts!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//texts!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Texts = newVal + return arg0 + }, + }, + // Result: + // * block[Go(widget.RichTextSegment)] + "Go(*widget.ParagraphSegment)//texts?": { + Doc: "Get *widget.ParagraphSegment Texts value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ParagraphSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ParagraphSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//texts?: arg 1: " + "expected native of type *widget.ParagraphSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//texts?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//texts?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Texts)) + for i, it := range self.Texts { + items[i] = ifaceToNative(ps.Idx, it, "Go(widget.RichTextSegment)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // textual returns no content for a paragraph container. + // + // Args: + // * recv - Go(*widget.ParagraphSegment) + // Result: + // * string + "Go(*widget.ParagraphSegment)//textual": { + Doc: "(*widget.ParagraphSegment).Textual", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ParagraphSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ParagraphSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//textual: arg 1: " + "expected native of type *widget.ParagraphSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//textual: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//textual: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Textual() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // unselect does nothing for a paragraph container. + // + // Args: + // * recv - Go(*widget.ParagraphSegment) + "Go(*widget.ParagraphSegment)//unselect": { + Doc: "(*widget.ParagraphSegment).Unselect", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ParagraphSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ParagraphSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//unselect: arg 1: " + "expected native of type *widget.ParagraphSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//unselect: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//unselect: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unselect() + return arg0 + }, + }, + // update doesnt need to change a paragraph container. + // + // Args: + // * recv - Go(*widget.ParagraphSegment) + // * 1 - Go(fyne.CanvasObject) + "Go(*widget.ParagraphSegment)//update": { + Doc: "(*widget.ParagraphSegment).Update", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ParagraphSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ParagraphSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//update: arg 1: " + "expected native of type *widget.ParagraphSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//update: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//update: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//update: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//update: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//update: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//update: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Update(arg1Val) + return arg0 + }, + }, + // visual returns the no extra elements. + // + // Args: + // * recv - Go(*widget.ParagraphSegment) + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.ParagraphSegment)//visual": { + Doc: "(*widget.ParagraphSegment).Visual", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ParagraphSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ParagraphSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//visual: arg 1: " + "expected native of type *widget.ParagraphSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//visual: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ParagraphSegment)//visual: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visual() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.PopUp)//base-widget!": { + Doc: "Set *widget.PopUp BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//base-widget!: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.PopUp)//base-widget?": { + Doc: "Get *widget.PopUp BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//base-widget?: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // Args: + // * canvas - Go(fyne.Canvas) + // Result: + // * Go(fyne.Canvas) + "Go(*widget.PopUp)//canvas!": { + Doc: "Set *widget.PopUp Canvas value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//canvas!: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//canvas!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//canvas!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Canvas + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//canvas!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//canvas!: arg 2: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//canvas!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//canvas!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Canvas = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Canvas) + "Go(*widget.PopUp)//canvas?": { + Doc: "Get *widget.PopUp Canvas value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//canvas?: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//canvas?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//canvas?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Canvas, "Go(fyne.Canvas)") + return resObj + }, + }, + // Args: + // * content - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.PopUp)//content!": { + Doc: "Set *widget.PopUp Content value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//content!: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//content!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//content!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//content!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//content!: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//content!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//content!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Content = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.PopUp)//content?": { + Doc: "Get *widget.PopUp Content value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//content?: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//content?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//content?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Content, "Go(fyne.CanvasObject)") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.PopUp) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.PopUp)//create-renderer": { + Doc: "(*widget.PopUp).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//create-renderer: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.PopUp) + // * wid - Go(fyne.Widget) + "Go(*widget.PopUp)//extend-base-widget": { + Doc: "(*widget.PopUp).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//extend-base-widget: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.PopUp)//hidden!": { + Doc: "Set *widget.PopUp Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//hidden!: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.PopUp)//hidden?": { + Doc: "Get *widget.PopUp Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//hidden?: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // hide this widget, if it was previously visible + // + // Args: + // * recv - Go(*widget.PopUp) + "Go(*widget.PopUp)//hide": { + Doc: "(*widget.PopUp).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//hide: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Args: + // * recv - Go(*widget.PopUp) + // Result: + // * Go(fyne.Size) + "Go(*widget.PopUp)//min-size": { + Doc: "(*widget.PopUp).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//min-size: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // move the widget to a new position. A PopUp position is absolute to the top, left of its canvas. + // For PopUp this actually moves the content so checking Position() will not return the same value as is set here. + // + // Args: + // * recv - Go(*widget.PopUp) + // * pos - Go(fyne.Position) + "Go(*widget.PopUp)//move": { + Doc: "(*widget.PopUp).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//move: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.PopUp) + // Result: + // * Go(fyne.position) + "Go(*widget.PopUp)//position": { + Doc: "(*widget.PopUp).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//position: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.PopUp) + "Go(*widget.PopUp)//refresh": { + Doc: "(*widget.PopUp).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//refresh: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize changes the size of the PopUp's content. + // PopUps always have the size of their canvas, but this call updates the + // size of the content portion. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.PopUp) + // * size - Go(fyne.Size) + "Go(*widget.PopUp)//resize": { + Doc: "(*widget.PopUp).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//resize: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // show this pop-up as overlay if not already shown. + // + // Args: + // * recv - Go(*widget.PopUp) + "Go(*widget.PopUp)//show": { + Doc: "(*widget.PopUp).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // show-at-position shows this pop-up at the given position. + // + // Args: + // * recv - Go(*widget.PopUp) + // * pos - Go(fyne.Position) + "Go(*widget.PopUp)//show-at-position": { + Doc: "(*widget.PopUp).ShowAtPosition", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show-at-position: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show-at-position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show-at-position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show-at-position: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show-at-position: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ShowAtPosition(arg1Val) + return arg0 + }, + }, + // show-at-relative-position shows this pop-up at the given position relative to stated object. + // + // Since 2.4 + // + // Args: + // * recv - Go(*widget.PopUp) + // * rel - Go(fyne.Position) + // * to - Go(fyne.CanvasObject) + "Go(*widget.PopUp)//show-at-relative-position": { + Doc: "(*widget.PopUp).ShowAtRelativePosition", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show-at-relative-position: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show-at-relative-position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show-at-relative-position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show-at-relative-position: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show-at-relative-position: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.CanvasObject + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show-at-relative-position: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show-at-relative-position: arg 3: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show-at-relative-position: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//show-at-relative-position: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ShowAtRelativePosition(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.PopUp) + // Result: + // * Go(fyne.size) + "Go(*widget.PopUp)//size": { + Doc: "(*widget.PopUp).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//size: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // tapped is called when the user taps the popUp background - if not modal then dismiss this widget + // + // Args: + // * recv - Go(*widget.PopUp) + // * - - Go(*fyne.PointEvent) + "Go(*widget.PopUp)//tapped": { + Doc: "(*widget.PopUp).Tapped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//tapped: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//tapped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//tapped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//tapped: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//tapped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//tapped: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Tapped(arg1Val) + return arg0 + }, + }, + // tapped-secondary is called when the user right/alt taps the background - if not modal then dismiss this widget + // + // Args: + // * recv - Go(*widget.PopUp) + // * - - Go(*fyne.PointEvent) + "Go(*widget.PopUp)//tapped-secondary": { + Doc: "(*widget.PopUp).TappedSecondary", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//tapped-secondary: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//tapped-secondary: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//tapped-secondary: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//tapped-secondary: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//tapped-secondary: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//tapped-secondary: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TappedSecondary(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.PopUp) + // Result: + // * Go(fyne.theme) + "Go(*widget.PopUp)//theme": { + Doc: "(*widget.PopUp).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//theme: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.PopUp) + // Result: + // * bool + "Go(*widget.PopUp)//visible": { + Doc: "(*widget.PopUp).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUp + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUp); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//visible: arg 1: " + "expected native of type *widget.PopUp, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUp)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + // Result: + // * bool + "Go(*widget.PopUpMenu)//activate-last-submenu": { + Doc: "(*widget.PopUpMenu).ActivateLastSubmenu", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//activate-last-submenu: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//activate-last-submenu: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//activate-last-submenu: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ActivateLastSubmenu() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + "Go(*widget.PopUpMenu)//activate-next": { + Doc: "(*widget.PopUpMenu).ActivateNext", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//activate-next: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//activate-next: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//activate-next: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ActivateNext() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + "Go(*widget.PopUpMenu)//activate-previous": { + Doc: "(*widget.PopUpMenu).ActivatePrevious", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//activate-previous: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//activate-previous: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//activate-previous: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ActivatePrevious() + return arg0 + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.PopUpMenu)//base-widget!": { + Doc: "Set *widget.PopUpMenu BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//base-widget!: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.PopUpMenu)//base-widget?": { + Doc: "Get *widget.PopUpMenu BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//base-widget?: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.PopUpMenu)//create-renderer": { + Doc: "(*widget.PopUpMenu).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//create-renderer: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + "Go(*widget.PopUpMenu)//deactivate-child": { + Doc: "(*widget.PopUpMenu).DeactivateChild", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//deactivate-child: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//deactivate-child: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//deactivate-child: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.DeactivateChild() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + // Result: + // * bool + "Go(*widget.PopUpMenu)//deactivate-last-submenu": { + Doc: "(*widget.PopUpMenu).DeactivateLastSubmenu", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//deactivate-last-submenu: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//deactivate-last-submenu: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//deactivate-last-submenu: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.DeactivateLastSubmenu() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + "Go(*widget.PopUpMenu)//dismiss": { + Doc: "(*widget.PopUpMenu).Dismiss", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//dismiss: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//dismiss: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//dismiss: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Dismiss() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + // * wid - Go(fyne.Widget) + "Go(*widget.PopUpMenu)//extend-base-widget": { + Doc: "(*widget.PopUpMenu).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//extend-base-widget: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // focus-gained is triggered when the object gained focus. For the pop-up menu it does nothing. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.PopUpMenu) + "Go(*widget.PopUpMenu)//focus-gained": { + Doc: "(*widget.PopUpMenu).FocusGained", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//focus-gained: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//focus-gained: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//focus-gained: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusGained() + return arg0 + }, + }, + // focus-lost is triggered when the object lost focus. For the pop-up menu it does nothing. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.PopUpMenu) + "Go(*widget.PopUpMenu)//focus-lost": { + Doc: "(*widget.PopUpMenu).FocusLost", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//focus-lost: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//focus-lost: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//focus-lost: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusLost() + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.PopUpMenu)//hidden!": { + Doc: "Set *widget.PopUpMenu Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//hidden!: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.PopUpMenu)//hidden?": { + Doc: "Get *widget.PopUpMenu Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//hidden?: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // hide hides the pop-up menu. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.PopUpMenu) + "Go(*widget.PopUpMenu)//hide": { + Doc: "(*widget.PopUpMenu).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//hide: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * items - block[Go(fyne.CanvasObject)] + // Result: + // * block[Go(fyne.CanvasObject)] + "Go(*widget.PopUpMenu)//items!": { + Doc: "Set *widget.PopUpMenu Items value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//items!: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//items!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//items!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []fyne.CanvasObject + switch v := arg1.(type) { + case env.Block: + newVal = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//items!: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//items!: arg 2: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//items!: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//items!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//items!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//items!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Items = newVal + return arg0 + }, + }, + // Result: + // * block[Go(fyne.CanvasObject)] + "Go(*widget.PopUpMenu)//items?": { + Doc: "Get *widget.PopUpMenu Items value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//items?: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//items?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//items?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Items)) + for i, it := range self.Items { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.CanvasObject)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // Args: + // * menu - Go(*widget.Menu) + // Result: + // * Go(*widget.Menu) + "Go(*widget.PopUpMenu)//menu!": { + Doc: "Set *widget.PopUpMenu Menu value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//menu!: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//menu!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//menu!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.Menu + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Menu); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//menu!: arg 2: " + "expected native of type *widget.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//menu!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//menu!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Menu = newVal + return arg0 + }, + }, + // Result: + // * Go(*widget.Menu) + "Go(*widget.PopUpMenu)//menu?": { + Doc: "Get *widget.PopUpMenu Menu value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//menu?: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//menu?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//menu?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.Menu, "Go(*widget.Menu)") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + // Result: + // * Go(fyne.Size) + "Go(*widget.PopUpMenu)//min-size": { + Doc: "(*widget.PopUpMenu).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//min-size: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // move moves the pop-up menu. + // The position is absolute because pop-up menus are shown in an overlay which covers the whole canvas. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.PopUpMenu) + // * pos - Go(fyne.Position) + "Go(*widget.PopUpMenu)//move": { + Doc: "(*widget.PopUpMenu).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//move: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-dismiss - fn { } + // Result: + // * fn { } + "Go(*widget.PopUpMenu)//on-dismiss!": { + Doc: "Set *widget.PopUpMenu OnDismiss value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//on-dismiss!: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//on-dismiss!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//on-dismiss!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//on-dismiss!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//on-dismiss!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//on-dismiss!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnDismiss = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*widget.PopUpMenu)//on-dismiss?": { + Doc: "Get *widget.PopUpMenu OnDismiss value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//on-dismiss?: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//on-dismiss?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//on-dismiss?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.OnDismiss() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + // Result: + // * Go(fyne.position) + "Go(*widget.PopUpMenu)//position": { + Doc: "(*widget.PopUpMenu).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//position: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + "Go(*widget.PopUpMenu)//refresh": { + Doc: "(*widget.PopUpMenu).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//refresh: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize changes the size of the pop-up menu. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.PopUpMenu) + // * size - Go(fyne.Size) + "Go(*widget.PopUpMenu)//resize": { + Doc: "(*widget.PopUpMenu).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//resize: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // show makes the pop-up menu visible. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.PopUpMenu) + "Go(*widget.PopUpMenu)//show": { + Doc: "(*widget.PopUpMenu).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // show-at-position shows the pop-up menu at the specified position. + // + // Args: + // * recv - Go(*widget.PopUpMenu) + // * pos - Go(fyne.Position) + "Go(*widget.PopUpMenu)//show-at-position": { + Doc: "(*widget.PopUpMenu).ShowAtPosition", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show-at-position: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show-at-position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show-at-position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show-at-position: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show-at-position: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ShowAtPosition(arg1Val) + return arg0 + }, + }, + // show-at-relative-position shows the pop-up menu at the position relative to given object. + // + // Since 2.4 + // + // Args: + // * recv - Go(*widget.PopUpMenu) + // * rel - Go(fyne.Position) + // * to - Go(fyne.CanvasObject) + "Go(*widget.PopUpMenu)//show-at-relative-position": { + Doc: "(*widget.PopUpMenu).ShowAtRelativePosition", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show-at-relative-position: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show-at-relative-position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show-at-relative-position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show-at-relative-position: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show-at-relative-position: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.CanvasObject + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show-at-relative-position: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show-at-relative-position: arg 3: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show-at-relative-position: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//show-at-relative-position: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ShowAtRelativePosition(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + // Result: + // * Go(fyne.size) + "Go(*widget.PopUpMenu)//size": { + Doc: "(*widget.PopUpMenu).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//size: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + // * 1 - Go(*fyne.PointEvent) + "Go(*widget.PopUpMenu)//tapped": { + Doc: "(*widget.PopUpMenu).Tapped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//tapped: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//tapped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//tapped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//tapped: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//tapped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//tapped: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Tapped(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + // Result: + // * Go(fyne.theme) + "Go(*widget.PopUpMenu)//theme": { + Doc: "(*widget.PopUpMenu).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//theme: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + "Go(*widget.PopUpMenu)//trigger-last": { + Doc: "(*widget.PopUpMenu).TriggerLast", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//trigger-last: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//trigger-last: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//trigger-last: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TriggerLast() + return arg0 + }, + }, + // typed-key handles key events. It allows keyboard control of the pop-up menu. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.PopUpMenu) + // * e - Go(*fyne.KeyEvent) + "Go(*widget.PopUpMenu)//typed-key": { + Doc: "(*widget.PopUpMenu).TypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//typed-key: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//typed-key: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//typed-key: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedKey(arg1Val) + return arg0 + }, + }, + // typed-rune handles text events. For pop-up menus this does nothing. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.PopUpMenu) + // * 1 - Go(rune) + "Go(*widget.PopUpMenu)//typed-rune": { + Doc: "(*widget.PopUpMenu).TypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//typed-rune: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//typed-rune: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//typed-rune: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedRune(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.PopUpMenu) + // Result: + // * bool + "Go(*widget.PopUpMenu)//visible": { + Doc: "(*widget.PopUpMenu).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.PopUpMenu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.PopUpMenu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//visible: arg 1: " + "expected native of type *widget.PopUpMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.PopUpMenu)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.ProgressBar)//base-widget!": { + Doc: "Set *widget.ProgressBar BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//base-widget!: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.ProgressBar)//base-widget?": { + Doc: "Get *widget.ProgressBar BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//base-widget?: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // bind connects the specified data source to this ProgressBar. + // The current value will be displayed and any changes in the data will cause the widget to update. + // + // Since: 2.0 + // + // Args: + // * recv - Go(*widget.ProgressBar) + // * data - Go(binding.Float) + "Go(*widget.ProgressBar)//bind": { + Doc: "(*widget.ProgressBar).Bind", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//bind: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//bind: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//bind: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.Float + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_Float(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//bind: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Float); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//bind: arg 2: " + "expected native of type binding.Float, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//bind: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//bind: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Bind(arg1Val) + return arg0 + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.ProgressBar) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.ProgressBar)//create-renderer": { + Doc: "(*widget.ProgressBar).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//create-renderer: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.ProgressBar) + // * wid - Go(fyne.Widget) + "Go(*widget.ProgressBar)//extend-base-widget": { + Doc: "(*widget.ProgressBar).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//extend-base-widget: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.ProgressBar)//hidden!": { + Doc: "Set *widget.ProgressBar Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//hidden!: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.ProgressBar)//hidden?": { + Doc: "Get *widget.ProgressBar Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//hidden?: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.ProgressBar) + "Go(*widget.ProgressBar)//hide": { + Doc: "(*widget.ProgressBar).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//hide: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * max - decimal + // Result: + // * decimal + "Go(*widget.ProgressBar)//max!": { + Doc: "Set *widget.ProgressBar Max value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//max!: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//max!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//max!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float64 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//max!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Max = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*widget.ProgressBar)//max?": { + Doc: "Get *widget.ProgressBar Max value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//max?: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//max?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//max?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.Max)) + return resObj + }, + }, + // Args: + // * min - decimal + // Result: + // * decimal + "Go(*widget.ProgressBar)//min!": { + Doc: "Set *widget.ProgressBar Min value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//min!: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//min!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//min!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float64 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//min!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Min = newVal + return arg0 + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Args: + // * recv - Go(*widget.ProgressBar) + // Result: + // * Go(fyne.Size) + "Go(*widget.ProgressBar)//min-size": { + Doc: "(*widget.ProgressBar).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//min-size: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Result: + // * decimal + "Go(*widget.ProgressBar)//min?": { + Doc: "Get *widget.ProgressBar Min value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//min?: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//min?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//min?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.Min)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.ProgressBar) + // * pos - Go(fyne.Position) + "Go(*widget.ProgressBar)//move": { + Doc: "(*widget.ProgressBar).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//move: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.ProgressBar) + // Result: + // * Go(fyne.position) + "Go(*widget.ProgressBar)//position": { + Doc: "(*widget.ProgressBar).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//position: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.ProgressBar) + "Go(*widget.ProgressBar)//refresh": { + Doc: "(*widget.ProgressBar).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//refresh: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.ProgressBar) + // * size - Go(fyne.Size) + "Go(*widget.ProgressBar)//resize": { + Doc: "(*widget.ProgressBar).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//resize: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // set-value changes the current value of this progress bar (from p.Min to p.Max). + // The widget will be refreshed to indicate the change. + // + // Args: + // * recv - Go(*widget.ProgressBar) + // * v - decimal + "Go(*widget.ProgressBar)//set-value": { + Doc: "(*widget.ProgressBar).SetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//set-value: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float64 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//set-value: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetValue(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.ProgressBar) + "Go(*widget.ProgressBar)//show": { + Doc: "(*widget.ProgressBar).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//show: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.ProgressBar) + // Result: + // * Go(fyne.size) + "Go(*widget.ProgressBar)//size": { + Doc: "(*widget.ProgressBar).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//size: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * text-formatter - fn { } -> string + // Result: + // * fn { } -> string + "Go(*widget.ProgressBar)//text-formatter!": { + Doc: "Set *widget.ProgressBar TextFormatter value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//text-formatter!: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//text-formatter!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//text-formatter!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() string + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//text-formatter!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() string { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res string + if vc, ok := ps.Res.(env.String); ok { + res = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.ProgressBar)//text-formatter!: arg 2: callback result: "+"expected string, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//text-formatter!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//text-formatter!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.TextFormatter = newVal + return arg0 + }, + }, + // Result: + // * fn { } -> string + "Go(*widget.ProgressBar)//text-formatter?": { + Doc: "Get *widget.ProgressBar TextFormatter value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//text-formatter?: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//text-formatter?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//text-formatter?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := self.TextFormatter() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.ProgressBar) + // Result: + // * Go(fyne.theme) + "Go(*widget.ProgressBar)//theme": { + Doc: "(*widget.ProgressBar).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//theme: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // unbind disconnects any configured data source from this ProgressBar. + // The current value will remain at the last value of the data source. + // + // Since: 2.0 + // + // Args: + // * recv - Go(*widget.ProgressBar) + "Go(*widget.ProgressBar)//unbind": { + Doc: "(*widget.ProgressBar).Unbind", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//unbind: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//unbind: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//unbind: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unbind() + return arg0 + }, + }, + // Args: + // * value - decimal + // Result: + // * decimal + "Go(*widget.ProgressBar)//value!": { + Doc: "Set *widget.ProgressBar Value value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//value!: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//value!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//value!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float64 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//value!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Value = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*widget.ProgressBar)//value?": { + Doc: "Get *widget.ProgressBar Value value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//value?: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//value?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//value?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.Value)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.ProgressBar) + // Result: + // * bool + "Go(*widget.ProgressBar)//visible": { + Doc: "(*widget.ProgressBar).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//visible: arg 1: " + "expected native of type *widget.ProgressBar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBar)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.ProgressBarInfinite)//base-widget!": { + Doc: "Set *widget.ProgressBarInfinite BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//base-widget!: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.ProgressBarInfinite)//base-widget?": { + Doc: "Get *widget.ProgressBarInfinite BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//base-widget?: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.ProgressBarInfinite) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.ProgressBarInfinite)//create-renderer": { + Doc: "(*widget.ProgressBarInfinite).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//create-renderer: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.ProgressBarInfinite) + // * wid - Go(fyne.Widget) + "Go(*widget.ProgressBarInfinite)//extend-base-widget": { + Doc: "(*widget.ProgressBarInfinite).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//extend-base-widget: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.ProgressBarInfinite)//hidden!": { + Doc: "Set *widget.ProgressBarInfinite Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//hidden!: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.ProgressBarInfinite)//hidden?": { + Doc: "Get *widget.ProgressBarInfinite Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//hidden?: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // hide this widget, if it was previously visible + // + // Args: + // * recv - Go(*widget.ProgressBarInfinite) + "Go(*widget.ProgressBarInfinite)//hide": { + Doc: "(*widget.ProgressBarInfinite).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//hide: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Args: + // * recv - Go(*widget.ProgressBarInfinite) + // Result: + // * Go(fyne.Size) + "Go(*widget.ProgressBarInfinite)//min-size": { + Doc: "(*widget.ProgressBarInfinite).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//min-size: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.ProgressBarInfinite) + // * pos - Go(fyne.Position) + "Go(*widget.ProgressBarInfinite)//move": { + Doc: "(*widget.ProgressBarInfinite).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//move: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.ProgressBarInfinite) + // Result: + // * Go(fyne.position) + "Go(*widget.ProgressBarInfinite)//position": { + Doc: "(*widget.ProgressBarInfinite).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//position: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.ProgressBarInfinite) + "Go(*widget.ProgressBarInfinite)//refresh": { + Doc: "(*widget.ProgressBarInfinite).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//refresh: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.ProgressBarInfinite) + // * size - Go(fyne.Size) + "Go(*widget.ProgressBarInfinite)//resize": { + Doc: "(*widget.ProgressBarInfinite).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//resize: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // running returns the current state of the infinite progress animation + // + // Args: + // * recv - Go(*widget.ProgressBarInfinite) + // Result: + // * bool + "Go(*widget.ProgressBarInfinite)//running": { + Doc: "(*widget.ProgressBarInfinite).Running", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//running: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//running: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//running: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Running() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // show this widget, if it was previously hidden + // + // Args: + // * recv - Go(*widget.ProgressBarInfinite) + "Go(*widget.ProgressBarInfinite)//show": { + Doc: "(*widget.ProgressBarInfinite).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//show: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.ProgressBarInfinite) + // Result: + // * Go(fyne.size) + "Go(*widget.ProgressBarInfinite)//size": { + Doc: "(*widget.ProgressBarInfinite).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//size: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // start the infinite progress bar animation + // + // Args: + // * recv - Go(*widget.ProgressBarInfinite) + "Go(*widget.ProgressBarInfinite)//start": { + Doc: "(*widget.ProgressBarInfinite).Start", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//start: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//start: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//start: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Start() + return arg0 + }, + }, + // stop the infinite progress bar animation + // + // Args: + // * recv - Go(*widget.ProgressBarInfinite) + "Go(*widget.ProgressBarInfinite)//stop": { + Doc: "(*widget.ProgressBarInfinite).Stop", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//stop: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//stop: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//stop: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Stop() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.ProgressBarInfinite) + // Result: + // * Go(fyne.theme) + "Go(*widget.ProgressBarInfinite)//theme": { + Doc: "(*widget.ProgressBarInfinite).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//theme: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.ProgressBarInfinite) + // Result: + // * bool + "Go(*widget.ProgressBarInfinite)//visible": { + Doc: "(*widget.ProgressBarInfinite).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ProgressBarInfinite + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ProgressBarInfinite); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//visible: arg 1: " + "expected native of type *widget.ProgressBarInfinite, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ProgressBarInfinite)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // append adds a new option to the end of a RadioGroup widget. + // + // Args: + // * recv - Go(*widget.RadioGroup) + // * option - string + "Go(*widget.RadioGroup)//append": { + Doc: "(*widget.RadioGroup).Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//append: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.Append(arg1Val) + return arg0 + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.RadioGroup)//base-widget!": { + Doc: "Set *widget.RadioGroup BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//base-widget!: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.RadioGroup)//base-widget?": { + Doc: "Get *widget.RadioGroup BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//base-widget?: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.RadioGroup) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.RadioGroup)//create-renderer": { + Doc: "(*widget.RadioGroup).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//create-renderer: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.RadioGroup) + "Go(*widget.RadioGroup)//disable": { + Doc: "(*widget.RadioGroup).Disable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//disable: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//disable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//disable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Disable() + return arg0 + }, + }, + // Args: + // * disableable-widget - Go(widget.DisableableWidget) + // Result: + // * Go(widget.DisableableWidget) + "Go(*widget.RadioGroup)//disableable-widget!": { + Doc: "Set *widget.RadioGroup DisableableWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//disableable-widget!: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//disableable-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//disableable-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.DisableableWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//disableable-widget!: arg 2: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//disableable-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//disableable-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.DisableableWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.DisableableWidget) + "Go(*widget.RadioGroup)//disableable-widget?": { + Doc: "Get *widget.RadioGroup DisableableWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//disableable-widget?: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//disableable-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//disableable-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.DisableableWidget, "Go(*widget.DisableableWidget)") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.RadioGroup) + // Result: + // * bool + "Go(*widget.RadioGroup)//disabled": { + Doc: "(*widget.RadioGroup).Disabled", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//disabled: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//disabled: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//disabled: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Disabled() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.RadioGroup) + "Go(*widget.RadioGroup)//enable": { + Doc: "(*widget.RadioGroup).Enable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//enable: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//enable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//enable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Enable() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.RadioGroup) + // * wid - Go(fyne.Widget) + "Go(*widget.RadioGroup)//extend-base-widget": { + Doc: "(*widget.RadioGroup).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//extend-base-widget: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.RadioGroup)//hidden!": { + Doc: "Set *widget.RadioGroup Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//hidden!: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.RadioGroup)//hidden?": { + Doc: "Get *widget.RadioGroup Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//hidden?: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.RadioGroup) + "Go(*widget.RadioGroup)//hide": { + Doc: "(*widget.RadioGroup).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//hide: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * horizontal - bool + // Result: + // * bool + "Go(*widget.RadioGroup)//horizontal!": { + Doc: "Set *widget.RadioGroup Horizontal value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//horizontal!: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//horizontal!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//horizontal!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//horizontal!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Horizontal = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.RadioGroup)//horizontal?": { + Doc: "Get *widget.RadioGroup Horizontal value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//horizontal?: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//horizontal?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//horizontal?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Horizontal)) + return resObj + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Args: + // * recv - Go(*widget.RadioGroup) + // Result: + // * Go(fyne.Size) + "Go(*widget.RadioGroup)//min-size": { + Doc: "(*widget.RadioGroup).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//min-size: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.RadioGroup) + // * pos - Go(fyne.Position) + "Go(*widget.RadioGroup)//move": { + Doc: "(*widget.RadioGroup).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//move: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-changed - fn { string } + // Result: + // * fn { string } + "Go(*widget.RadioGroup)//on-changed!": { + Doc: "Set *widget.RadioGroup OnChanged value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//on-changed!: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//on-changed!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//on-changed!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(string) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//on-changed!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//on-changed!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//on-changed!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnChanged = newVal + return arg0 + }, + }, + // Result: + // * fn { string } + "Go(*widget.RadioGroup)//on-changed?": { + Doc: "Get *widget.RadioGroup OnChanged value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//on-changed?: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//on-changed?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//on-changed?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//on-changed?: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + self.OnChanged(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * options - block[string] + // Result: + // * block[string] + "Go(*widget.RadioGroup)//options!": { + Doc: "Set *widget.RadioGroup Options value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//options!: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//options!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//options!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []string + switch v := arg1.(type) { + case env.Block: + newVal = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//options!: arg 2: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//options!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//options!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Options = newVal + return arg0 + }, + }, + // Result: + // * block[string] + "Go(*widget.RadioGroup)//options?": { + Doc: "Get *widget.RadioGroup Options value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//options?: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//options?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//options?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Options)) + for i, it := range self.Options { + items[i] = *env.NewString(it) + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // Args: + // * recv - Go(*widget.RadioGroup) + // Result: + // * Go(fyne.position) + "Go(*widget.RadioGroup)//position": { + Doc: "(*widget.RadioGroup).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//position: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.RadioGroup) + "Go(*widget.RadioGroup)//refresh": { + Doc: "(*widget.RadioGroup).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//refresh: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * required - bool + // Result: + // * bool + "Go(*widget.RadioGroup)//required!": { + Doc: "Set *widget.RadioGroup Required value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//required!: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//required!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//required!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//required!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Required = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.RadioGroup)//required?": { + Doc: "Get *widget.RadioGroup Required value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//required?: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//required?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//required?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Required)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.RadioGroup) + // * size - Go(fyne.Size) + "Go(*widget.RadioGroup)//resize": { + Doc: "(*widget.RadioGroup).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//resize: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * selected - string + // Result: + // * string + "Go(*widget.RadioGroup)//selected!": { + Doc: "Set *widget.RadioGroup Selected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//selected!: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//selected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//selected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//selected!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Selected = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.RadioGroup)//selected?": { + Doc: "Get *widget.RadioGroup Selected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//selected?: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//selected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//selected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Selected) + return resObj + }, + }, + // set-selected sets the radio option, it can be used to set a default option. + // + // Args: + // * recv - Go(*widget.RadioGroup) + // * option - string + "Go(*widget.RadioGroup)//set-selected": { + Doc: "(*widget.RadioGroup).SetSelected", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//set-selected: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//set-selected: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//set-selected: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//set-selected: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetSelected(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.RadioGroup) + "Go(*widget.RadioGroup)//show": { + Doc: "(*widget.RadioGroup).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//show: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.RadioGroup) + // Result: + // * Go(fyne.size) + "Go(*widget.RadioGroup)//size": { + Doc: "(*widget.RadioGroup).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//size: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.RadioGroup) + // Result: + // * Go(fyne.theme) + "Go(*widget.RadioGroup)//theme": { + Doc: "(*widget.RadioGroup).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//theme: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.RadioGroup) + // Result: + // * bool + "Go(*widget.RadioGroup)//visible": { + Doc: "(*widget.RadioGroup).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RadioGroup + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RadioGroup); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//visible: arg 1: " + "expected native of type *widget.RadioGroup, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RadioGroup)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // append-markdown parses the given markdown string and appends the + // content to the widget, with the appropriate formatting. + // This API is intended for appending complete markdown documents or + // standalone fragments, and should not be used to parse a single + // markdown document piecewise. + // + // Since: 2.5 + // + // Args: + // * recv - Go(*widget.RichText) + // * content - string + "Go(*widget.RichText)//append-markdown": { + Doc: "(*widget.RichText).AppendMarkdown", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//append-markdown: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//append-markdown: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//append-markdown: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//append-markdown: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.AppendMarkdown(arg1Val) + return arg0 + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.RichText)//base-widget!": { + Doc: "Set *widget.RichText BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//base-widget!: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.RichText)//base-widget?": { + Doc: "Get *widget.RichText BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//base-widget?: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.RichText) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.RichText)//create-renderer": { + Doc: "(*widget.RichText).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//create-renderer: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.RichText) + // * wid - Go(fyne.Widget) + "Go(*widget.RichText)//extend-base-widget": { + Doc: "(*widget.RichText).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//extend-base-widget: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.RichText)//hidden!": { + Doc: "Set *widget.RichText Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//hidden!: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.RichText)//hidden?": { + Doc: "Get *widget.RichText Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//hidden?: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.RichText) + "Go(*widget.RichText)//hide": { + Doc: "(*widget.RichText).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//hide: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size calculates the minimum size of a rich text widget. + // This is based on the contained text with a standard amount of padding added. + // + // Args: + // * recv - Go(*widget.RichText) + // Result: + // * Go(fyne.Size) + "Go(*widget.RichText)//min-size": { + Doc: "(*widget.RichText).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//min-size: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.RichText) + // * pos - Go(fyne.Position) + "Go(*widget.RichText)//move": { + Doc: "(*widget.RichText).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//move: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // parse-markdown allows setting the content of this RichText widget from a markdown string. + // It will replace the content of this widget similarly to SetText, but with the appropriate formatting. + // + // Args: + // * recv - Go(*widget.RichText) + // * content - string + "Go(*widget.RichText)//parse-markdown": { + Doc: "(*widget.RichText).ParseMarkdown", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//parse-markdown: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//parse-markdown: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//parse-markdown: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//parse-markdown: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.ParseMarkdown(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.RichText) + // Result: + // * Go(fyne.position) + "Go(*widget.RichText)//position": { + Doc: "(*widget.RichText).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//position: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // refresh triggers a redraw of the rich text. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.RichText) + "Go(*widget.RichText)//refresh": { + Doc: "(*widget.RichText).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//refresh: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize sets a new size for the rich text. + // This should only be called if it is not in a container with a layout manager. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.RichText) + // * size - Go(fyne.Size) + "Go(*widget.RichText)//resize": { + Doc: "(*widget.RichText).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//resize: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * segments - block[Go(widget.RichTextSegment)] + // Result: + // * block[Go(widget.RichTextSegment)] + "Go(*widget.RichText)//segments!": { + Doc: "Set *widget.RichText Segments value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//segments!: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//segments!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//segments!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []widget.RichTextSegment + switch v := arg1.(type) { + case env.Block: + newVal = make([]widget.RichTextSegment, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_widget_RichTextSegment(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//segments!: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.RichTextSegment); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//segments!: arg 2: " + "block item: " + "expected native of type widget.RichTextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//segments!: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//segments!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//segments!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//segments!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Segments = newVal + return arg0 + }, + }, + // Result: + // * block[Go(widget.RichTextSegment)] + "Go(*widget.RichText)//segments?": { + Doc: "Get *widget.RichText Segments value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//segments?: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//segments?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//segments?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Segments)) + for i, it := range self.Segments { + items[i] = ifaceToNative(ps.Idx, it, "Go(widget.RichTextSegment)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // Args: + // * recv - Go(*widget.RichText) + "Go(*widget.RichText)//show": { + Doc: "(*widget.RichText).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//show: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.RichText) + // Result: + // * Go(fyne.size) + "Go(*widget.RichText)//size": { + Doc: "(*widget.RichText).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//size: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // string returns the text widget buffer as string + // + // Args: + // * recv - Go(*widget.RichText) + // Result: + // * string + "Go(*widget.RichText)//string": { + Doc: "(*widget.RichText).String", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//string: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//string: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//string: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.String() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.RichText) + // Result: + // * Go(fyne.theme) + "Go(*widget.RichText)//theme": { + Doc: "(*widget.RichText).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//theme: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * truncation - integer + // Result: + // * integer + "Go(*widget.RichText)//truncation!": { + Doc: "Set *widget.RichText Truncation value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//truncation!: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//truncation!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//truncation!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.TextTruncation + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextTruncation + if natOk { + natVal, natValOk = nat.Value.(fyne.TextTruncation) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//truncation!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.TextTruncation(u) + } + } + self.Truncation = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.RichText)//truncation?": { + Doc: "Get *widget.RichText Truncation value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//truncation?: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//truncation?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//truncation?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Truncation))) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.RichText) + // Result: + // * bool + "Go(*widget.RichText)//visible": { + Doc: "(*widget.RichText).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//visible: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * wrapping - integer + // Result: + // * integer + "Go(*widget.RichText)//wrapping!": { + Doc: "Set *widget.RichText Wrapping value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//wrapping!: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//wrapping!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//wrapping!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.TextWrap + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextWrap + if natOk { + natVal, natValOk = nat.Value.(fyne.TextWrap) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//wrapping!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.TextWrap(u) + } + } + self.Wrapping = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.RichText)//wrapping?": { + Doc: "Get *widget.RichText Wrapping value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichText + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichText); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//wrapping?: arg 1: " + "expected native of type *widget.RichText, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//wrapping?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichText)//wrapping?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Wrapping))) + return resObj + }, + }, + // Args: + // * alignment - integer + // Result: + // * integer + "Go(*widget.RichTextStyle)//alignment!": { + Doc: "Set *widget.RichTextStyle Alignment value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichTextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichTextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//alignment!: arg 1: " + "expected native of type *widget.RichTextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//alignment!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//alignment!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.TextAlign + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextAlign + if natOk { + natVal, natValOk = nat.Value.(fyne.TextAlign) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//alignment!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.TextAlign(u) + } + } + self.Alignment = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.RichTextStyle)//alignment?": { + Doc: "Get *widget.RichTextStyle Alignment value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichTextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichTextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//alignment?: arg 1: " + "expected native of type *widget.RichTextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//alignment?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//alignment?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Alignment))) + return resObj + }, + }, + // Args: + // * color-name - string + // Result: + // * string + "Go(*widget.RichTextStyle)//color-name!": { + Doc: "Set *widget.RichTextStyle ColorName value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichTextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichTextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//color-name!: arg 1: " + "expected native of type *widget.RichTextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//color-name!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//color-name!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.ThemeColorName + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.ThemeColorName + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeColorName) + } + if natValOk { + newVal = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//color-name!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.ThemeColorName(u) + } + } + self.ColorName = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.RichTextStyle)//color-name?": { + Doc: "Get *widget.RichTextStyle ColorName value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichTextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichTextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//color-name?: arg 1: " + "expected native of type *widget.RichTextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//color-name?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//color-name?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(string(self.ColorName)) + return resObj + }, + }, + // Args: + // * inline - bool + // Result: + // * bool + "Go(*widget.RichTextStyle)//inline!": { + Doc: "Set *widget.RichTextStyle Inline value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichTextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichTextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//inline!: arg 1: " + "expected native of type *widget.RichTextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//inline!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//inline!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//inline!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Inline = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.RichTextStyle)//inline?": { + Doc: "Get *widget.RichTextStyle Inline value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichTextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichTextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//inline?: arg 1: " + "expected native of type *widget.RichTextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//inline?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//inline?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Inline)) + return resObj + }, + }, + // Args: + // * size-name - string + // Result: + // * string + "Go(*widget.RichTextStyle)//size-name!": { + Doc: "Set *widget.RichTextStyle SizeName value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichTextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichTextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//size-name!: arg 1: " + "expected native of type *widget.RichTextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//size-name!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//size-name!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.ThemeSizeName + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.ThemeSizeName + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeSizeName) + } + if natValOk { + newVal = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//size-name!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.ThemeSizeName(u) + } + } + self.SizeName = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.RichTextStyle)//size-name?": { + Doc: "Get *widget.RichTextStyle SizeName value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichTextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichTextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//size-name?: arg 1: " + "expected native of type *widget.RichTextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//size-name?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//size-name?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(string(self.SizeName)) + return resObj + }, + }, + // Args: + // * text-style - Go(fyne.TextStyle) + // Result: + // * Go(fyne.TextStyle) + "Go(*widget.RichTextStyle)//text-style!": { + Doc: "Set *widget.RichTextStyle TextStyle value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichTextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichTextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//text-style!: arg 1: " + "expected native of type *widget.RichTextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//text-style!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//text-style!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.TextStyle + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//text-style!: arg 2: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//text-style!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//text-style!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.TextStyle = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.TextStyle) + "Go(*widget.RichTextStyle)//text-style?": { + Doc: "Get *widget.RichTextStyle TextStyle value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.RichTextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichTextStyle); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//text-style?: arg 1: " + "expected native of type *widget.RichTextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//text-style?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.RichTextStyle)//text-style?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.TextStyle, "Go(*fyne.TextStyle)") + return resObj + }, + }, + // Args: + // * alignment - integer + // Result: + // * integer + "Go(*widget.Select)//alignment!": { + Doc: "Set *widget.Select Alignment value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//alignment!: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//alignment!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//alignment!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.TextAlign + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextAlign + if natOk { + natVal, natValOk = nat.Value.(fyne.TextAlign) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//alignment!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.TextAlign(u) + } + } + self.Alignment = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Select)//alignment?": { + Doc: "Get *widget.Select Alignment value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//alignment?: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//alignment?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//alignment?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Alignment))) + return resObj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Select)//base-widget!": { + Doc: "Set *widget.Select BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//base-widget!: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Select)//base-widget?": { + Doc: "Get *widget.Select BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//base-widget?: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // clear-selected clears the current option of the select widget. After + // clearing the current option, the Select widget's PlaceHolder will + // be displayed. + // + // Args: + // * recv - Go(*widget.Select) + "Go(*widget.Select)//clear-selected": { + Doc: "(*widget.Select).ClearSelected", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//clear-selected: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//clear-selected: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//clear-selected: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ClearSelected() + return arg0 + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.Select) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Select)//create-renderer": { + Doc: "(*widget.Select).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//create-renderer: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Select) + "Go(*widget.Select)//disable": { + Doc: "(*widget.Select).Disable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//disable: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//disable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//disable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Disable() + return arg0 + }, + }, + // Args: + // * disableable-widget - Go(widget.DisableableWidget) + // Result: + // * Go(widget.DisableableWidget) + "Go(*widget.Select)//disableable-widget!": { + Doc: "Set *widget.Select DisableableWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//disableable-widget!: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//disableable-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//disableable-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.DisableableWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//disableable-widget!: arg 2: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//disableable-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//disableable-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.DisableableWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.DisableableWidget) + "Go(*widget.Select)//disableable-widget?": { + Doc: "Get *widget.Select DisableableWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//disableable-widget?: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//disableable-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//disableable-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.DisableableWidget, "Go(*widget.DisableableWidget)") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Select) + // Result: + // * bool + "Go(*widget.Select)//disabled": { + Doc: "(*widget.Select).Disabled", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//disabled: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//disabled: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//disabled: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Disabled() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Select) + "Go(*widget.Select)//enable": { + Doc: "(*widget.Select).Enable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//enable: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//enable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//enable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Enable() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Select) + // * wid - Go(fyne.Widget) + "Go(*widget.Select)//extend-base-widget": { + Doc: "(*widget.Select).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//extend-base-widget: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // focus-gained is called after this Select has gained focus. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Select) + "Go(*widget.Select)//focus-gained": { + Doc: "(*widget.Select).FocusGained", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//focus-gained: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//focus-gained: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//focus-gained: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusGained() + return arg0 + }, + }, + // focus-lost is called after this Select has lost focus. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Select) + "Go(*widget.Select)//focus-lost": { + Doc: "(*widget.Select).FocusLost", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//focus-lost: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//focus-lost: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//focus-lost: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusLost() + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Select)//hidden!": { + Doc: "Set *widget.Select Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//hidden!: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Select)//hidden?": { + Doc: "Get *widget.Select Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//hidden?: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // hide hides the select. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.Select) + "Go(*widget.Select)//hide": { + Doc: "(*widget.Select).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//hide: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Args: + // * recv - Go(*widget.Select) + // Result: + // * Go(fyne.Size) + "Go(*widget.Select)//min-size": { + Doc: "(*widget.Select).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//min-size: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // mouse-in is called when a desktop pointer enters the widget + // + // Args: + // * recv - Go(*widget.Select) + // * 1 - Go(*desktop.MouseEvent) + "Go(*widget.Select)//mouse-in": { + Doc: "(*widget.Select).MouseIn", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//mouse-in: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//mouse-in: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//mouse-in: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//mouse-in: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//mouse-in: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//mouse-in: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseIn(arg1Val) + return arg0 + }, + }, + // mouse-moved is called when a desktop pointer hovers over the widget + // + // Args: + // * recv - Go(*widget.Select) + // * 1 - Go(*desktop.MouseEvent) + "Go(*widget.Select)//mouse-moved": { + Doc: "(*widget.Select).MouseMoved", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//mouse-moved: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//mouse-moved: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//mouse-moved: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//mouse-moved: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//mouse-moved: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//mouse-moved: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseMoved(arg1Val) + return arg0 + }, + }, + // mouse-out is called when a desktop pointer exits the widget + // + // Args: + // * recv - Go(*widget.Select) + "Go(*widget.Select)//mouse-out": { + Doc: "(*widget.Select).MouseOut", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//mouse-out: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//mouse-out: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//mouse-out: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseOut() + return arg0 + }, + }, + // move changes the relative position of the select. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.Select) + // * pos - Go(fyne.Position) + "Go(*widget.Select)//move": { + Doc: "(*widget.Select).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//move: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-changed - fn { string } + // Result: + // * fn { string } + "Go(*widget.Select)//on-changed!": { + Doc: "Set *widget.Select OnChanged value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//on-changed!: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//on-changed!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//on-changed!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(string) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//on-changed!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//on-changed!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//on-changed!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnChanged = newVal + return arg0 + }, + }, + // Result: + // * fn { string } + "Go(*widget.Select)//on-changed?": { + Doc: "Get *widget.Select OnChanged value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//on-changed?: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//on-changed?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//on-changed?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//on-changed?: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + self.OnChanged(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * options - block[string] + // Result: + // * block[string] + "Go(*widget.Select)//options!": { + Doc: "Set *widget.Select Options value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//options!: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//options!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//options!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []string + switch v := arg1.(type) { + case env.Block: + newVal = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//options!: arg 2: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//options!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//options!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Options = newVal + return arg0 + }, + }, + // Result: + // * block[string] + "Go(*widget.Select)//options?": { + Doc: "Get *widget.Select Options value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//options?: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//options?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//options?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Options)) + for i, it := range self.Options { + items[i] = *env.NewString(it) + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // Args: + // * place-holder - string + // Result: + // * string + "Go(*widget.Select)//place-holder!": { + Doc: "Set *widget.Select PlaceHolder value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//place-holder!: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//place-holder!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//place-holder!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//place-holder!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.PlaceHolder = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.Select)//place-holder?": { + Doc: "Get *widget.Select PlaceHolder value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//place-holder?: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//place-holder?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//place-holder?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.PlaceHolder) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Select) + // Result: + // * Go(fyne.position) + "Go(*widget.Select)//position": { + Doc: "(*widget.Select).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//position: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Select) + "Go(*widget.Select)//refresh": { + Doc: "(*widget.Select).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//refresh: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize sets a new size for a widget. + // Note this should not be used if the widget is being managed by a Layout within a Container. + // + // Args: + // * recv - Go(*widget.Select) + // * size - Go(fyne.Size) + "Go(*widget.Select)//resize": { + Doc: "(*widget.Select).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//resize: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * selected - string + // Result: + // * string + "Go(*widget.Select)//selected!": { + Doc: "Set *widget.Select Selected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//selected!: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//selected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//selected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//selected!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Selected = newVal + return arg0 + }, + }, + // selected-index returns the index value of the currently selected item in Options list. + // It will return -1 if there is no selection. + // + // Args: + // * recv - Go(*widget.Select) + // Result: + // * integer + "Go(*widget.Select)//selected-index": { + Doc: "(*widget.Select).SelectedIndex", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//selected-index: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//selected-index: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//selected-index: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.SelectedIndex() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Result: + // * string + "Go(*widget.Select)//selected?": { + Doc: "Get *widget.Select Selected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//selected?: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//selected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//selected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Selected) + return resObj + }, + }, + // set-options updates the list of options available and refreshes the widget + // + // Since: 2.4 + // + // Args: + // * recv - Go(*widget.Select) + // * options - block[string] + "Go(*widget.Select)//set-options": { + Doc: "(*widget.Select).SetOptions", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//set-options: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//set-options: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//set-options: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []string + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//set-options: arg 2: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//set-options: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//set-options: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetOptions(arg1Val) + return arg0 + }, + }, + // set-selected sets the current option of the select widget + // + // Args: + // * recv - Go(*widget.Select) + // * text - string + "Go(*widget.Select)//set-selected": { + Doc: "(*widget.Select).SetSelected", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//set-selected: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//set-selected: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//set-selected: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//set-selected: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetSelected(arg1Val) + return arg0 + }, + }, + // set-selected-index will set the Selected option from the value in Options list at index position. + // + // Args: + // * recv - Go(*widget.Select) + // * index - integer + "Go(*widget.Select)//set-selected-index": { + Doc: "(*widget.Select).SetSelectedIndex", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//set-selected-index: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//set-selected-index: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//set-selected-index: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//set-selected-index: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetSelectedIndex(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Select) + "Go(*widget.Select)//show": { + Doc: "(*widget.Select).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//show: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Select) + // Result: + // * Go(fyne.size) + "Go(*widget.Select)//size": { + Doc: "(*widget.Select).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//size: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // tapped is called when a pointer tapped event is captured and triggers any tap handler + // + // Args: + // * recv - Go(*widget.Select) + // * 1 - Go(*fyne.PointEvent) + "Go(*widget.Select)//tapped": { + Doc: "(*widget.Select).Tapped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//tapped: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//tapped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//tapped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//tapped: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//tapped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//tapped: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Tapped(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Select) + // Result: + // * Go(fyne.theme) + "Go(*widget.Select)//theme": { + Doc: "(*widget.Select).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//theme: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // typed-key is called if a key event happens while this Select is focused. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Select) + // * event - Go(*fyne.KeyEvent) + "Go(*widget.Select)//typed-key": { + Doc: "(*widget.Select).TypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//typed-key: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//typed-key: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//typed-key: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedKey(arg1Val) + return arg0 + }, + }, + // typed-rune is called if a text event happens while this Select is focused. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Select) + // * - - Go(rune) + "Go(*widget.Select)//typed-rune": { + Doc: "(*widget.Select).TypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//typed-rune: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//typed-rune: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//typed-rune: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedRune(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Select) + // Result: + // * bool + "Go(*widget.Select)//visible": { + Doc: "(*widget.Select).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Select + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Select); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//visible: arg 1: " + "expected native of type *widget.Select, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Select)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // Result: + // * bool + "Go(*widget.SelectEntry)//accepts-tab": { + Doc: "(*widget.SelectEntry).AcceptsTab", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//accepts-tab: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//accepts-tab: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//accepts-tab: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.AcceptsTab() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * action-item - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.SelectEntry)//action-item!": { + Doc: "Set *widget.SelectEntry ActionItem value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//action-item!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//action-item!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//action-item!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//action-item!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//action-item!: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//action-item!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//action-item!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.ActionItem = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.SelectEntry)//action-item?": { + Doc: "Get *widget.SelectEntry ActionItem value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//action-item?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//action-item?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//action-item?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.ActionItem, "Go(fyne.CanvasObject)") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * text - string + "Go(*widget.SelectEntry)//append": { + Doc: "(*widget.SelectEntry).Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//append: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.Append(arg1Val) + return arg0 + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.SelectEntry)//base-widget!": { + Doc: "Set *widget.SelectEntry BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//base-widget!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.SelectEntry)//base-widget?": { + Doc: "Get *widget.SelectEntry BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//base-widget?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * data - Go(binding.String) + "Go(*widget.SelectEntry)//bind": { + Doc: "(*widget.SelectEntry).Bind", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//bind: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//bind: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//bind: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.String + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//bind: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//bind: arg 2: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//bind: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//bind: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Bind(arg1Val) + return arg0 + }, + }, + // create-renderer returns a new renderer for this select entry. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.SelectEntry) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.SelectEntry)//create-renderer": { + Doc: "(*widget.SelectEntry).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//create-renderer: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // Result: + // * Go(desktop.cursor) + "Go(*widget.SelectEntry)//cursor": { + Doc: "(*widget.SelectEntry).Cursor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Cursor() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(desktop.Cursor)") + return res0Obj + }, + }, + // Args: + // * cursor-column - integer + // Result: + // * integer + "Go(*widget.SelectEntry)//cursor-column!": { + Doc: "Set *widget.SelectEntry CursorColumn value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor-column!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor-column!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor-column!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal int + if vc, ok := arg1.(env.Integer); ok { + newVal = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor-column!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.CursorColumn = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.SelectEntry)//cursor-column?": { + Doc: "Get *widget.SelectEntry CursorColumn value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor-column?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor-column?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor-column?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(self.CursorColumn)) + return resObj + }, + }, + // Args: + // * cursor-row - integer + // Result: + // * integer + "Go(*widget.SelectEntry)//cursor-row!": { + Doc: "Set *widget.SelectEntry CursorRow value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor-row!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor-row!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor-row!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal int + if vc, ok := arg1.(env.Integer); ok { + newVal = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor-row!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.CursorRow = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.SelectEntry)//cursor-row?": { + Doc: "Get *widget.SelectEntry CursorRow value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor-row?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor-row?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//cursor-row?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(self.CursorRow)) + return resObj + }, + }, + // disable this widget so that it cannot be interacted with, updating any style appropriately. + // + // Implements: fyne.disableableWidget + // + // Args: + // * recv - Go(*widget.SelectEntry) + "Go(*widget.SelectEntry)//disable": { + Doc: "(*widget.SelectEntry).Disable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//disable: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//disable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//disable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Disable() + return arg0 + }, + }, + // Args: + // * disableable-widget - Go(widget.DisableableWidget) + // Result: + // * Go(widget.DisableableWidget) + "Go(*widget.SelectEntry)//disableable-widget!": { + Doc: "Set *widget.SelectEntry DisableableWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//disableable-widget!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//disableable-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//disableable-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.DisableableWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.DisableableWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//disableable-widget!: arg 2: " + "expected native of type *widget.DisableableWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//disableable-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//disableable-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.DisableableWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.DisableableWidget) + "Go(*widget.SelectEntry)//disableable-widget?": { + Doc: "Get *widget.SelectEntry DisableableWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//disableable-widget?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//disableable-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//disableable-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.DisableableWidget, "Go(*widget.DisableableWidget)") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // Result: + // * bool + "Go(*widget.SelectEntry)//disabled": { + Doc: "(*widget.SelectEntry).Disabled", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//disabled: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//disabled: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//disabled: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Disabled() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * p - Go(*fyne.PointEvent) + "Go(*widget.SelectEntry)//double-tapped": { + Doc: "(*widget.SelectEntry).DoubleTapped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//double-tapped: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//double-tapped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//double-tapped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//double-tapped: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//double-tapped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//double-tapped: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.DoubleTapped(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + "Go(*widget.SelectEntry)//drag-end": { + Doc: "(*widget.SelectEntry).DragEnd", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//drag-end: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//drag-end: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//drag-end: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.DragEnd() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * d - Go(*fyne.DragEvent) + "Go(*widget.SelectEntry)//dragged": { + Doc: "(*widget.SelectEntry).Dragged", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//dragged: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//dragged: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//dragged: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.DragEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.DragEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//dragged: arg 2: " + "expected native of type *fyne.DragEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//dragged: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//dragged: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Dragged(arg1Val) + return arg0 + }, + }, + // enable this widget, updating any style or features appropriately. + // + // Implements: fyne.DisableableWidget + // + // Args: + // * recv - Go(*widget.SelectEntry) + "Go(*widget.SelectEntry)//enable": { + Doc: "(*widget.SelectEntry).Enable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//enable: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//enable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//enable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Enable() + return arg0 + }, + }, + // Args: + // * entry - Go(widget.Entry) + // Result: + // * Go(widget.Entry) + "Go(*widget.SelectEntry)//entry!": { + Doc: "Set *widget.SelectEntry Entry value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//entry!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//entry!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//entry!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.Entry + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Entry); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//entry!: arg 2: " + "expected native of type *widget.Entry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//entry!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//entry!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Entry = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.Entry) + "Go(*widget.SelectEntry)//entry?": { + Doc: "Get *widget.SelectEntry Entry value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//entry?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//entry?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//entry?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.Entry, "Go(*widget.Entry)") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * wid - Go(fyne.Widget) + "Go(*widget.SelectEntry)//extend-base-widget": { + Doc: "(*widget.SelectEntry).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//extend-base-widget: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + "Go(*widget.SelectEntry)//focus-gained": { + Doc: "(*widget.SelectEntry).FocusGained", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//focus-gained: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//focus-gained: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//focus-gained: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusGained() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + "Go(*widget.SelectEntry)//focus-lost": { + Doc: "(*widget.SelectEntry).FocusLost", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//focus-lost: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//focus-lost: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//focus-lost: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusLost() + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.SelectEntry)//hidden!": { + Doc: "Set *widget.SelectEntry Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//hidden!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.SelectEntry)//hidden?": { + Doc: "Get *widget.SelectEntry Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//hidden?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + "Go(*widget.SelectEntry)//hide": { + Doc: "(*widget.SelectEntry).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//hide: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * key - Go(*fyne.KeyEvent) + "Go(*widget.SelectEntry)//key-down": { + Doc: "(*widget.SelectEntry).KeyDown", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//key-down: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//key-down: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//key-down: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//key-down: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//key-down: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//key-down: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.KeyDown(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * key - Go(*fyne.KeyEvent) + "Go(*widget.SelectEntry)//key-up": { + Doc: "(*widget.SelectEntry).KeyUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//key-up: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//key-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//key-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//key-up: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//key-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//key-up: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.KeyUp(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // Result: + // * integer + "Go(*widget.SelectEntry)//keyboard": { + Doc: "(*widget.SelectEntry).Keyboard", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//keyboard: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//keyboard: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//keyboard: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Keyboard() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(int32(res0))) + return res0Obj + }, + }, + // min-size returns the minimal size of the select entry. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.SelectEntry) + // Result: + // * Go(fyne.Size) + "Go(*widget.SelectEntry)//min-size": { + Doc: "(*widget.SelectEntry).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//min-size: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * m - Go(*desktop.MouseEvent) + "Go(*widget.SelectEntry)//mouse-down": { + Doc: "(*widget.SelectEntry).MouseDown", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//mouse-down: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//mouse-down: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//mouse-down: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//mouse-down: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//mouse-down: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//mouse-down: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseDown(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * m - Go(*desktop.MouseEvent) + "Go(*widget.SelectEntry)//mouse-up": { + Doc: "(*widget.SelectEntry).MouseUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//mouse-up: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//mouse-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//mouse-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//mouse-up: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//mouse-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//mouse-up: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseUp(arg1Val) + return arg0 + }, + }, + // move changes the relative position of the select entry. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.SelectEntry) + // * pos - Go(fyne.Position) + "Go(*widget.SelectEntry)//move": { + Doc: "(*widget.SelectEntry).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//move: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * multi-line - bool + // Result: + // * bool + "Go(*widget.SelectEntry)//multi-line!": { + Doc: "Set *widget.SelectEntry MultiLine value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//multi-line!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//multi-line!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//multi-line!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//multi-line!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.MultiLine = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.SelectEntry)//multi-line?": { + Doc: "Get *widget.SelectEntry MultiLine value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//multi-line?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//multi-line?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//multi-line?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.MultiLine)) + return resObj + }, + }, + // Args: + // * on-changed - fn { string } + // Result: + // * fn { string } + "Go(*widget.SelectEntry)//on-changed!": { + Doc: "Set *widget.SelectEntry OnChanged value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-changed!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-changed!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-changed!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(string) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-changed!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-changed!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-changed!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnChanged = newVal + return arg0 + }, + }, + // Result: + // * fn { string } + "Go(*widget.SelectEntry)//on-changed?": { + Doc: "Get *widget.SelectEntry OnChanged value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-changed?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-changed?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-changed?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-changed?: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + self.OnChanged(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-cursor-changed - fn { } + // Result: + // * fn { } + "Go(*widget.SelectEntry)//on-cursor-changed!": { + Doc: "Set *widget.SelectEntry OnCursorChanged value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-cursor-changed!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-cursor-changed!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-cursor-changed!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-cursor-changed!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-cursor-changed!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-cursor-changed!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnCursorChanged = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*widget.SelectEntry)//on-cursor-changed?": { + Doc: "Get *widget.SelectEntry OnCursorChanged value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-cursor-changed?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-cursor-changed?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-cursor-changed?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.OnCursorChanged() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-submitted - fn { string } + // Result: + // * fn { string } + "Go(*widget.SelectEntry)//on-submitted!": { + Doc: "Set *widget.SelectEntry OnSubmitted value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-submitted!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-submitted!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-submitted!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(string) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-submitted!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-submitted!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-submitted!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnSubmitted = newVal + return arg0 + }, + }, + // Result: + // * fn { string } + "Go(*widget.SelectEntry)//on-submitted?": { + Doc: "Get *widget.SelectEntry OnSubmitted value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-submitted?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-submitted?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-submitted?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//on-submitted?: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + self.OnSubmitted(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * password - bool + // Result: + // * bool + "Go(*widget.SelectEntry)//password!": { + Doc: "Set *widget.SelectEntry Password value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//password!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//password!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//password!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//password!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Password = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.SelectEntry)//password?": { + Doc: "Get *widget.SelectEntry Password value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//password?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//password?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//password?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Password)) + return resObj + }, + }, + // Args: + // * place-holder - string + // Result: + // * string + "Go(*widget.SelectEntry)//place-holder!": { + Doc: "Set *widget.SelectEntry PlaceHolder value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//place-holder!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//place-holder!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//place-holder!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//place-holder!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.PlaceHolder = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.SelectEntry)//place-holder?": { + Doc: "Get *widget.SelectEntry PlaceHolder value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//place-holder?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//place-holder?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//place-holder?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.PlaceHolder) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // Result: + // * Go(fyne.position) + "Go(*widget.SelectEntry)//position": { + Doc: "(*widget.SelectEntry).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//position: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + "Go(*widget.SelectEntry)//redo": { + Doc: "(*widget.SelectEntry).Redo", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//redo: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//redo: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//redo: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Redo() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + "Go(*widget.SelectEntry)//refresh": { + Doc: "(*widget.SelectEntry).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//refresh: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize changes the size of the select entry. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.SelectEntry) + // * size - Go(fyne.Size) + "Go(*widget.SelectEntry)//resize": { + Doc: "(*widget.SelectEntry).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//resize: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // Result: + // * string + "Go(*widget.SelectEntry)//selected-text": { + Doc: "(*widget.SelectEntry).SelectedText", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//selected-text: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//selected-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//selected-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.SelectedText() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * count - integer + "Go(*widget.SelectEntry)//set-min-rows-visible": { + Doc: "(*widget.SelectEntry).SetMinRowsVisible", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-min-rows-visible: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-min-rows-visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-min-rows-visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-min-rows-visible: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetMinRowsVisible(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * callback - fn { Go(error) } + "Go(*widget.SelectEntry)//set-on-validation-changed": { + Doc: "(*widget.SelectEntry).SetOnValidationChanged", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-on-validation-changed: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-on-validation-changed: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-on-validation-changed: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(error) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-on-validation-changed: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 error) { + var farg0Val env.Object + if farg0 != nil { + farg0Val = env.NewError(farg0.Error()) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-on-validation-changed: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-on-validation-changed: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnValidationChanged(arg1Val) + return arg0 + }, + }, + // set-options sets the options the user might select from. + // + // Args: + // * recv - Go(*widget.SelectEntry) + // * options - block[string] + "Go(*widget.SelectEntry)//set-options": { + Doc: "(*widget.SelectEntry).SetOptions", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-options: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-options: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-options: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []string + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-options: arg 2: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-options: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-options: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetOptions(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * text - string + "Go(*widget.SelectEntry)//set-place-holder": { + Doc: "(*widget.SelectEntry).SetPlaceHolder", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-place-holder: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-place-holder: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-place-holder: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-place-holder: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetPlaceHolder(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * text - string + "Go(*widget.SelectEntry)//set-text": { + Doc: "(*widget.SelectEntry).SetText", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-text: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-text: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetText(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * err - Go(error) + "Go(*widget.SelectEntry)//set-validation-error": { + Doc: "(*widget.SelectEntry).SetValidationError", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-validation-error: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-validation-error: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-validation-error: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val error + switch v := arg1.(type) { + case env.String: + arg1Val = errors.New(v.Value) + case env.Error: + arg1Val = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-validation-error: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//set-validation-error: arg 2: " + "expected error, string or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetValidationError(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + "Go(*widget.SelectEntry)//show": { + Doc: "(*widget.SelectEntry).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//show: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // Result: + // * Go(fyne.size) + "Go(*widget.SelectEntry)//size": { + Doc: "(*widget.SelectEntry).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//size: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * ev - Go(*fyne.PointEvent) + "Go(*widget.SelectEntry)//tapped": { + Doc: "(*widget.SelectEntry).Tapped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//tapped: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//tapped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//tapped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//tapped: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//tapped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//tapped: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Tapped(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * pe - Go(*fyne.PointEvent) + "Go(*widget.SelectEntry)//tapped-secondary": { + Doc: "(*widget.SelectEntry).TappedSecondary", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//tapped-secondary: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//tapped-secondary: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//tapped-secondary: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//tapped-secondary: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//tapped-secondary: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//tapped-secondary: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TappedSecondary(arg1Val) + return arg0 + }, + }, + // Args: + // * text - string + // Result: + // * string + "Go(*widget.SelectEntry)//text!": { + Doc: "Set *widget.SelectEntry Text value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Text = newVal + return arg0 + }, + }, + // Args: + // * text-style - Go(fyne.TextStyle) + // Result: + // * Go(fyne.TextStyle) + "Go(*widget.SelectEntry)//text-style!": { + Doc: "Set *widget.SelectEntry TextStyle value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text-style!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text-style!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text-style!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *fyne.TextStyle + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text-style!: arg 2: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text-style!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text-style!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.TextStyle = *newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.TextStyle) + "Go(*widget.SelectEntry)//text-style?": { + Doc: "Get *widget.SelectEntry TextStyle value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text-style?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text-style?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text-style?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.TextStyle, "Go(*fyne.TextStyle)") + return resObj + }, + }, + // Result: + // * string + "Go(*widget.SelectEntry)//text?": { + Doc: "Get *widget.SelectEntry Text value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//text?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Text) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // Result: + // * Go(fyne.theme) + "Go(*widget.SelectEntry)//theme": { + Doc: "(*widget.SelectEntry).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//theme: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * 1 - Go(*mobile.TouchEvent) + "Go(*widget.SelectEntry)//touch-cancel": { + Doc: "(*widget.SelectEntry).TouchCancel", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-cancel: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-cancel: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-cancel: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *mobile.TouchEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-cancel: arg 2: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-cancel: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-cancel: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TouchCancel(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * ev - Go(*mobile.TouchEvent) + "Go(*widget.SelectEntry)//touch-down": { + Doc: "(*widget.SelectEntry).TouchDown", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-down: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-down: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-down: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *mobile.TouchEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-down: arg 2: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-down: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-down: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TouchDown(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * 1 - Go(*mobile.TouchEvent) + "Go(*widget.SelectEntry)//touch-up": { + Doc: "(*widget.SelectEntry).TouchUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-up: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *mobile.TouchEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-up: arg 2: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//touch-up: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TouchUp(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * key - Go(*fyne.KeyEvent) + "Go(*widget.SelectEntry)//typed-key": { + Doc: "(*widget.SelectEntry).TypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-key: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-key: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-key: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedKey(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * r - Go(rune) + "Go(*widget.SelectEntry)//typed-rune": { + Doc: "(*widget.SelectEntry).TypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-rune: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-rune: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-rune: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedRune(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // * shortcut - Go(fyne.Shortcut) + "Go(*widget.SelectEntry)//typed-shortcut": { + Doc: "(*widget.SelectEntry).TypedShortcut", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-shortcut: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-shortcut: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-shortcut: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Shortcut + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Shortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-shortcut: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Shortcut); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-shortcut: arg 2: " + "expected native of type fyne.Shortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-shortcut: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//typed-shortcut: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedShortcut(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + "Go(*widget.SelectEntry)//unbind": { + Doc: "(*widget.SelectEntry).Unbind", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//unbind: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//unbind: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//unbind: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unbind() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + "Go(*widget.SelectEntry)//undo": { + Doc: "(*widget.SelectEntry).Undo", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//undo: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//undo: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//undo: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Undo() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // Result: + // * error + "Go(*widget.SelectEntry)//validate": { + Doc: "(*widget.SelectEntry).Validate", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//validate: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//validate: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//validate: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Validate() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * validator - fn { string } -> Go(error) + // Result: + // * fn { string } -> Go(error) + "Go(*widget.SelectEntry)//validator!": { + Doc: "Set *widget.SelectEntry Validator value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//validator!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//validator!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//validator!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.StringValidator + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.StringValidator + if natOk { + natVal, natValOk = nat.Value.(fyne.StringValidator) + } + if natValOk { + newVal = natVal + } else { + var u func(string) error + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//validator!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + u = func(farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.SelectEntry)//validator!: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.SelectEntry)//validator!: arg 2: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//validator!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + u = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//validator!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + newVal = fyne.StringValidator(u) + } + } + self.Validator = newVal + return arg0 + }, + }, + // Result: + // * fn { string } -> Go(error) + "Go(*widget.SelectEntry)//validator?": { + Doc: "Get *widget.SelectEntry Validator value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//validator?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//validator?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//validator?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//validator?: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + resErr := (func(string) error)(self.Validator)(arg0Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.SelectEntry) + // Result: + // * bool + "Go(*widget.SelectEntry)//visible": { + Doc: "(*widget.SelectEntry).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//visible: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * wrapping - integer + // Result: + // * integer + "Go(*widget.SelectEntry)//wrapping!": { + Doc: "Set *widget.SelectEntry Wrapping value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//wrapping!: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//wrapping!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//wrapping!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.TextWrap + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextWrap + if natOk { + natVal, natValOk = nat.Value.(fyne.TextWrap) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//wrapping!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = fyne.TextWrap(u) + } + } + self.Wrapping = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.SelectEntry)//wrapping?": { + Doc: "Get *widget.SelectEntry Wrapping value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.SelectEntry + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SelectEntry); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//wrapping?: arg 1: " + "expected native of type *widget.SelectEntry, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//wrapping?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SelectEntry)//wrapping?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Wrapping))) + return resObj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Separator)//base-widget!": { + Doc: "Set *widget.Separator BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//base-widget!: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Separator)//base-widget?": { + Doc: "Get *widget.Separator BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//base-widget?: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // create-renderer returns a new renderer for the separator. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.Separator) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Separator)//create-renderer": { + Doc: "(*widget.Separator).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//create-renderer: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Separator) + // * wid - Go(fyne.Widget) + "Go(*widget.Separator)//extend-base-widget": { + Doc: "(*widget.Separator).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//extend-base-widget: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Separator)//hidden!": { + Doc: "Set *widget.Separator Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//hidden!: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Separator)//hidden?": { + Doc: "Get *widget.Separator Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//hidden?: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Separator) + "Go(*widget.Separator)//hide": { + Doc: "(*widget.Separator).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//hide: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size returns the minimal size of the separator. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.Separator) + // Result: + // * Go(fyne.Size) + "Go(*widget.Separator)//min-size": { + Doc: "(*widget.Separator).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//min-size: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Separator) + // * pos - Go(fyne.Position) + "Go(*widget.Separator)//move": { + Doc: "(*widget.Separator).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//move: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Separator) + // Result: + // * Go(fyne.position) + "Go(*widget.Separator)//position": { + Doc: "(*widget.Separator).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//position: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Separator) + "Go(*widget.Separator)//refresh": { + Doc: "(*widget.Separator).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//refresh: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Separator) + // * size - Go(fyne.Size) + "Go(*widget.Separator)//resize": { + Doc: "(*widget.Separator).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//resize: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Separator) + "Go(*widget.Separator)//show": { + Doc: "(*widget.Separator).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//show: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Separator) + // Result: + // * Go(fyne.size) + "Go(*widget.Separator)//size": { + Doc: "(*widget.Separator).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//size: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Separator) + // Result: + // * Go(fyne.theme) + "Go(*widget.Separator)//theme": { + Doc: "(*widget.Separator).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//theme: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Separator) + // Result: + // * bool + "Go(*widget.Separator)//visible": { + Doc: "(*widget.Separator).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Separator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Separator); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//visible: arg 1: " + "expected native of type *widget.Separator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Separator)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // inline returns false as a separator should be full width. + // + // Args: + // * recv - Go(*widget.SeparatorSegment) + // Result: + // * bool + "Go(*widget.SeparatorSegment)//inline": { + Doc: "(*widget.SeparatorSegment).Inline", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SeparatorSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SeparatorSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//inline: arg 1: " + "expected native of type *widget.SeparatorSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//inline: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//inline: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Inline() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // select does nothing for a separator. + // + // Args: + // * recv - Go(*widget.SeparatorSegment) + // * - - Go(fyne.Position) + // * - - Go(fyne.Position) + "Go(*widget.SeparatorSegment)//select": { + Doc: "(*widget.SeparatorSegment).Select", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SeparatorSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SeparatorSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//select: arg 1: " + "expected native of type *widget.SeparatorSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//select: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//select: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//select: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//select: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Position + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//select: arg 3: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//select: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Select(arg1Val, arg2Val) + return arg0 + }, + }, + // selected-text returns the empty string for this separator. + // + // Args: + // * recv - Go(*widget.SeparatorSegment) + // Result: + // * string + "Go(*widget.SeparatorSegment)//selected-text": { + Doc: "(*widget.SeparatorSegment).SelectedText", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SeparatorSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SeparatorSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//selected-text: arg 1: " + "expected native of type *widget.SeparatorSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//selected-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//selected-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.SelectedText() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // textual returns no content for a separator element. + // + // Args: + // * recv - Go(*widget.SeparatorSegment) + // Result: + // * string + "Go(*widget.SeparatorSegment)//textual": { + Doc: "(*widget.SeparatorSegment).Textual", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SeparatorSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SeparatorSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//textual: arg 1: " + "expected native of type *widget.SeparatorSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//textual: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//textual: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Textual() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // unselect does nothing for a separator. + // + // Args: + // * recv - Go(*widget.SeparatorSegment) + "Go(*widget.SeparatorSegment)//unselect": { + Doc: "(*widget.SeparatorSegment).Unselect", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SeparatorSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SeparatorSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//unselect: arg 1: " + "expected native of type *widget.SeparatorSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//unselect: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//unselect: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unselect() + return arg0 + }, + }, + // update doesnt need to change a separator visual. + // + // Args: + // * recv - Go(*widget.SeparatorSegment) + // * 1 - Go(fyne.CanvasObject) + "Go(*widget.SeparatorSegment)//update": { + Doc: "(*widget.SeparatorSegment).Update", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SeparatorSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SeparatorSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//update: arg 1: " + "expected native of type *widget.SeparatorSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//update: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//update: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//update: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//update: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//update: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//update: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Update(arg1Val) + return arg0 + }, + }, + // visual returns the separator element for this segment. + // + // Args: + // * recv - Go(*widget.SeparatorSegment) + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.SeparatorSegment)//visual": { + Doc: "(*widget.SeparatorSegment).Visual", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.SeparatorSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.SeparatorSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//visual: arg 1: " + "expected native of type *widget.SeparatorSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//visual: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.SeparatorSegment)//visual: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visual() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Slider)//base-widget!": { + Doc: "Set *widget.Slider BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//base-widget!: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Slider)//base-widget?": { + Doc: "Get *widget.Slider BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//base-widget?: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // bind connects the specified data source to this Slider. + // The current value will be displayed and any changes in the data will cause the widget to update. + // User interactions with this Slider will set the value into the data source. + // + // Since: 2.0 + // + // Args: + // * recv - Go(*widget.Slider) + // * data - Go(binding.Float) + "Go(*widget.Slider)//bind": { + Doc: "(*widget.Slider).Bind", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//bind: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//bind: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//bind: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.Float + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_Float(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//bind: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Float); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//bind: arg 2: " + "expected native of type binding.Float, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//bind: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//bind: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Bind(arg1Val) + return arg0 + }, + }, + // create-renderer links this widget to its renderer. + // + // Args: + // * recv - Go(*widget.Slider) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Slider)//create-renderer": { + Doc: "(*widget.Slider).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//create-renderer: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // disable disables the slider + // + // Since: 2.5 + // + // Args: + // * recv - Go(*widget.Slider) + "Go(*widget.Slider)//disable": { + Doc: "(*widget.Slider).Disable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//disable: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//disable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//disable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Disable() + return arg0 + }, + }, + // disabled returns true if the slider is currently disabled + // + // Since: 2.5 + // + // Args: + // * recv - Go(*widget.Slider) + // Result: + // * bool + "Go(*widget.Slider)//disabled": { + Doc: "(*widget.Slider).Disabled", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//disabled: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//disabled: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//disabled: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Disabled() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // drag-end is called when the drag ends. + // + // Args: + // * recv - Go(*widget.Slider) + "Go(*widget.Slider)//drag-end": { + Doc: "(*widget.Slider).DragEnd", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//drag-end: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//drag-end: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//drag-end: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.DragEnd() + return arg0 + }, + }, + // dragged is called when a drag event occurs. + // + // Args: + // * recv - Go(*widget.Slider) + // * e - Go(*fyne.DragEvent) + "Go(*widget.Slider)//dragged": { + Doc: "(*widget.Slider).Dragged", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//dragged: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//dragged: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//dragged: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.DragEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.DragEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//dragged: arg 2: " + "expected native of type *fyne.DragEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//dragged: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//dragged: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Dragged(arg1Val) + return arg0 + }, + }, + // enable enables the slider + // + // Since: 2.5 + // + // Args: + // * recv - Go(*widget.Slider) + "Go(*widget.Slider)//enable": { + Doc: "(*widget.Slider).Enable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//enable: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//enable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//enable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Enable() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Slider) + // * wid - Go(fyne.Widget) + "Go(*widget.Slider)//extend-base-widget": { + Doc: "(*widget.Slider).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//extend-base-widget: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // focus-gained is called when this item gained the focus. + // + // Since: 2.4 + // + // Args: + // * recv - Go(*widget.Slider) + "Go(*widget.Slider)//focus-gained": { + Doc: "(*widget.Slider).FocusGained", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//focus-gained: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//focus-gained: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//focus-gained: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusGained() + return arg0 + }, + }, + // focus-lost is called when this item lost the focus. + // + // Since: 2.4 + // + // Args: + // * recv - Go(*widget.Slider) + "Go(*widget.Slider)//focus-lost": { + Doc: "(*widget.Slider).FocusLost", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//focus-lost: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//focus-lost: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//focus-lost: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusLost() + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Slider)//hidden!": { + Doc: "Set *widget.Slider Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//hidden!: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Slider)//hidden?": { + Doc: "Get *widget.Slider Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//hidden?: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Slider) + "Go(*widget.Slider)//hide": { + Doc: "(*widget.Slider).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//hide: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * max - decimal + // Result: + // * decimal + "Go(*widget.Slider)//max!": { + Doc: "Set *widget.Slider Max value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//max!: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//max!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//max!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float64 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//max!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Max = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*widget.Slider)//max?": { + Doc: "Get *widget.Slider Max value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//max?: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//max?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//max?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.Max)) + return resObj + }, + }, + // Args: + // * min - decimal + // Result: + // * decimal + "Go(*widget.Slider)//min!": { + Doc: "Set *widget.Slider Min value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//min!: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//min!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//min!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float64 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//min!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Min = newVal + return arg0 + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Args: + // * recv - Go(*widget.Slider) + // Result: + // * Go(fyne.Size) + "Go(*widget.Slider)//min-size": { + Doc: "(*widget.Slider).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//min-size: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Result: + // * decimal + "Go(*widget.Slider)//min?": { + Doc: "Get *widget.Slider Min value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//min?: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//min?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//min?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.Min)) + return resObj + }, + }, + // mouse-in is called when a desktop pointer enters the widget. + // + // Since: 2.4 + // + // Args: + // * recv - Go(*widget.Slider) + // * - - Go(*desktop.MouseEvent) + "Go(*widget.Slider)//mouse-in": { + Doc: "(*widget.Slider).MouseIn", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//mouse-in: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//mouse-in: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//mouse-in: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//mouse-in: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//mouse-in: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//mouse-in: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseIn(arg1Val) + return arg0 + }, + }, + // mouse-moved is called when a desktop pointer hovers over the widget. + // + // Since: 2.4 + // + // Args: + // * recv - Go(*widget.Slider) + // * - - Go(*desktop.MouseEvent) + "Go(*widget.Slider)//mouse-moved": { + Doc: "(*widget.Slider).MouseMoved", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//mouse-moved: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//mouse-moved: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//mouse-moved: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//mouse-moved: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//mouse-moved: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//mouse-moved: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseMoved(arg1Val) + return arg0 + }, + }, + // mouse-out is called when a desktop pointer exits the widget + // + // Since: 2.4 + // + // Args: + // * recv - Go(*widget.Slider) + "Go(*widget.Slider)//mouse-out": { + Doc: "(*widget.Slider).MouseOut", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//mouse-out: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//mouse-out: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//mouse-out: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseOut() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Slider) + // * pos - Go(fyne.Position) + "Go(*widget.Slider)//move": { + Doc: "(*widget.Slider).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//move: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-change-ended - fn { decimal } + // Result: + // * fn { decimal } + "Go(*widget.Slider)//on-change-ended!": { + Doc: "Set *widget.Slider OnChangeEnded value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-change-ended!: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-change-ended!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-change-ended!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(float64) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-change-ended!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 float64) { + var farg0Val env.Object + farg0Val = *env.NewDecimal(float64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-change-ended!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-change-ended!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnChangeEnded = newVal + return arg0 + }, + }, + // Result: + // * fn { decimal } + "Go(*widget.Slider)//on-change-ended?": { + Doc: "Get *widget.Slider OnChangeEnded value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-change-ended?: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-change-ended?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-change-ended?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float64 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-change-ended?: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + self.OnChangeEnded(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-changed - fn { decimal } + // Result: + // * fn { decimal } + "Go(*widget.Slider)//on-changed!": { + Doc: "Set *widget.Slider OnChanged value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-changed!: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-changed!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-changed!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(float64) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-changed!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 float64) { + var farg0Val env.Object + farg0Val = *env.NewDecimal(float64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-changed!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-changed!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnChanged = newVal + return arg0 + }, + }, + // Result: + // * fn { decimal } + "Go(*widget.Slider)//on-changed?": { + Doc: "Get *widget.Slider OnChanged value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-changed?: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-changed?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-changed?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float64 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//on-changed?: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + self.OnChanged(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * orientation - integer + // Result: + // * integer + "Go(*widget.Slider)//orientation!": { + Doc: "Set *widget.Slider Orientation value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//orientation!: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//orientation!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//orientation!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal widget.Orientation + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.Orientation + if natOk { + natVal, natValOk = nat.Value.(widget.Orientation) + } + if natValOk { + newVal = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//orientation!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = widget.Orientation(u) + } + } + self.Orientation = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Slider)//orientation?": { + Doc: "Get *widget.Slider Orientation value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//orientation?: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//orientation?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//orientation?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(int(self.Orientation))) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Slider) + // Result: + // * Go(fyne.position) + "Go(*widget.Slider)//position": { + Doc: "(*widget.Slider).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//position: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Slider) + "Go(*widget.Slider)//refresh": { + Doc: "(*widget.Slider).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//refresh: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Slider) + // * size - Go(fyne.Size) + "Go(*widget.Slider)//resize": { + Doc: "(*widget.Slider).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//resize: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // set-value updates the value of the slider and clamps the value to be within the range. + // + // Args: + // * recv - Go(*widget.Slider) + // * value - decimal + "Go(*widget.Slider)//set-value": { + Doc: "(*widget.Slider).SetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//set-value: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float64 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//set-value: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetValue(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Slider) + "Go(*widget.Slider)//show": { + Doc: "(*widget.Slider).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//show: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Slider) + // Result: + // * Go(fyne.size) + "Go(*widget.Slider)//size": { + Doc: "(*widget.Slider).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//size: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * step - decimal + // Result: + // * decimal + "Go(*widget.Slider)//step!": { + Doc: "Set *widget.Slider Step value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//step!: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//step!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//step!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float64 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//step!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Step = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*widget.Slider)//step?": { + Doc: "Get *widget.Slider Step value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//step?: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//step?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//step?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.Step)) + return resObj + }, + }, + // tapped is called when a pointer tapped event is captured. + // + // Since: 2.4 + // + // Args: + // * recv - Go(*widget.Slider) + // * e - Go(*fyne.PointEvent) + "Go(*widget.Slider)//tapped": { + Doc: "(*widget.Slider).Tapped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//tapped: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//tapped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//tapped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//tapped: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//tapped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//tapped: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Tapped(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Slider) + // Result: + // * Go(fyne.theme) + "Go(*widget.Slider)//theme": { + Doc: "(*widget.Slider).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//theme: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // typed-key is called when this item receives a key event. + // + // Since: 2.4 + // + // Args: + // * recv - Go(*widget.Slider) + // * key - Go(*fyne.KeyEvent) + "Go(*widget.Slider)//typed-key": { + Doc: "(*widget.Slider).TypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//typed-key: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//typed-key: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//typed-key: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedKey(arg1Val) + return arg0 + }, + }, + // typed-rune is called when this item receives a char event. + // + // Since: 2.4 + // + // Args: + // * recv - Go(*widget.Slider) + // * - - Go(rune) + "Go(*widget.Slider)//typed-rune": { + Doc: "(*widget.Slider).TypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//typed-rune: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//typed-rune: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//typed-rune: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedRune(arg1Val) + return arg0 + }, + }, + // unbind disconnects any configured data source from this Slider. + // The current value will remain at the last value of the data source. + // + // Since: 2.0 + // + // Args: + // * recv - Go(*widget.Slider) + "Go(*widget.Slider)//unbind": { + Doc: "(*widget.Slider).Unbind", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//unbind: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//unbind: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//unbind: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unbind() + return arg0 + }, + }, + // Args: + // * value - decimal + // Result: + // * decimal + "Go(*widget.Slider)//value!": { + Doc: "Set *widget.Slider Value value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//value!: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//value!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//value!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal float64 + if vc, ok := arg1.(env.Decimal); ok { + newVal = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//value!: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Value = newVal + return arg0 + }, + }, + // Result: + // * decimal + "Go(*widget.Slider)//value?": { + Doc: "Get *widget.Slider Value value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//value?: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//value?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//value?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewDecimal(float64(self.Value)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Slider) + // Result: + // * bool + "Go(*widget.Slider)//visible": { + Doc: "(*widget.Slider).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Slider + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Slider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//visible: arg 1: " + "expected native of type *widget.Slider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Slider)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Table)//base-widget!": { + Doc: "Set *widget.Table BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//base-widget!: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Table)//base-widget?": { + Doc: "Get *widget.Table BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//base-widget?: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // Args: + // * create-cell - fn { } -> Go(fyne.CanvasObject) + // Result: + // * fn { } -> Go(fyne.CanvasObject) + "Go(*widget.Table)//create-cell!": { + Doc: "Set *widget.Table CreateCell value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-cell!: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-cell!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-cell!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() fyne.CanvasObject + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-cell!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Table)//create-cell!: arg 2: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Table)//create-cell!: arg 2: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Table)//create-cell!: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Table)//create-cell!: arg 2: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-cell!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-cell!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.CreateCell = newVal + return arg0 + }, + }, + // Result: + // * fn { } -> Go(fyne.CanvasObject) + "Go(*widget.Table)//create-cell?": { + Doc: "Get *widget.Table CreateCell value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-cell?: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-cell?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-cell?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := self.CreateCell() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * create-header - fn { } -> Go(fyne.CanvasObject) + // Result: + // * fn { } -> Go(fyne.CanvasObject) + "Go(*widget.Table)//create-header!": { + Doc: "Set *widget.Table CreateHeader value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-header!: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-header!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-header!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() fyne.CanvasObject + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-header!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Table)//create-header!: arg 2: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Table)//create-header!: arg 2: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Table)//create-header!: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Table)//create-header!: arg 2: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-header!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-header!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.CreateHeader = newVal + return arg0 + }, + }, + // Result: + // * fn { } -> Go(fyne.CanvasObject) + "Go(*widget.Table)//create-header?": { + Doc: "Get *widget.Table CreateHeader value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-header?: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-header?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-header?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := self.CreateHeader() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, 0, false, false, "Returned func") + return resObj + }, + }, + // create-renderer returns a new renderer for the table. + // + // Implements: fyne.Widget + // + // Args: + // * recv - Go(*widget.Table) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Table)//create-renderer": { + Doc: "(*widget.Table).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-renderer: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Table) + // Result: + // * Go(desktop.cursor) + "Go(*widget.Table)//cursor": { + Doc: "(*widget.Table).Cursor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//cursor: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//cursor: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//cursor: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Cursor() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(desktop.Cursor)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Table) + "Go(*widget.Table)//drag-end": { + Doc: "(*widget.Table).DragEnd", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//drag-end: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//drag-end: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//drag-end: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.DragEnd() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Table) + // * e - Go(*fyne.DragEvent) + "Go(*widget.Table)//dragged": { + Doc: "(*widget.Table).Dragged", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//dragged: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//dragged: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//dragged: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.DragEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.DragEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//dragged: arg 2: " + "expected native of type *fyne.DragEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//dragged: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//dragged: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Dragged(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Table) + // * wid - Go(fyne.Widget) + "Go(*widget.Table)//extend-base-widget": { + Doc: "(*widget.Table).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//extend-base-widget: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // focus-gained is called after this table has gained focus. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Table) + "Go(*widget.Table)//focus-gained": { + Doc: "(*widget.Table).FocusGained", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//focus-gained: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//focus-gained: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//focus-gained: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusGained() + return arg0 + }, + }, + // focus-lost is called after this Table has lost focus. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Table) + "Go(*widget.Table)//focus-lost": { + Doc: "(*widget.Table).FocusLost", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//focus-lost: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//focus-lost: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//focus-lost: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusLost() + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Table)//hidden!": { + Doc: "Set *widget.Table Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hidden!: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Table)//hidden?": { + Doc: "Get *widget.Table Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hidden?: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Table) + "Go(*widget.Table)//hide": { + Doc: "(*widget.Table).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hide: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * hide-separators - bool + // Result: + // * bool + "Go(*widget.Table)//hide-separators!": { + Doc: "Set *widget.Table HideSeparators value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hide-separators!: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hide-separators!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hide-separators!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hide-separators!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.HideSeparators = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Table)//hide-separators?": { + Doc: "Get *widget.Table HideSeparators value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hide-separators?: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hide-separators?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//hide-separators?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.HideSeparators)) + return resObj + }, + }, + // Args: + // * length - fn { } -> [ integer integer ] + // Result: + // * fn { } -> [ integer integer ] + "Go(*widget.Table)//length!": { + Doc: "Set *widget.Table Length value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//length!: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//length!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//length!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() (int, int) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//length!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() (int, int) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 int + var res1 int + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Table)//length!: arg 2: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Table)//length!: arg 2: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Table)//length!: arg 2: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[1].(env.Integer); ok { + res1 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Table)//length!: arg 2: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//length!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//length!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.Length = newVal + return arg0 + }, + }, + // Result: + // * fn { } -> [ integer integer ] + "Go(*widget.Table)//length?": { + Doc: "Get *widget.Table Length value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//length?: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//length?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//length?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0, res1 := self.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + var res1Obj env.Object + res1Obj = *env.NewInteger(int64(res1)) + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, 0, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Table) + // Result: + // * Go(fyne.Size) + "Go(*widget.Table)//min-size": { + Doc: "(*widget.Table).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//min-size: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // mouse-down response to desktop mouse event + // + // Args: + // * recv - Go(*widget.Table) + // * e - Go(*desktop.MouseEvent) + "Go(*widget.Table)//mouse-down": { + Doc: "(*widget.Table).MouseDown", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-down: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-down: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-down: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-down: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-down: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-down: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseDown(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Table) + // * ev - Go(*desktop.MouseEvent) + "Go(*widget.Table)//mouse-in": { + Doc: "(*widget.Table).MouseIn", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-in: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-in: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-in: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-in: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-in: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-in: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseIn(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Table) + // * ev - Go(*desktop.MouseEvent) + "Go(*widget.Table)//mouse-moved": { + Doc: "(*widget.Table).MouseMoved", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-moved: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-moved: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-moved: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-moved: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-moved: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-moved: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseMoved(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Table) + "Go(*widget.Table)//mouse-out": { + Doc: "(*widget.Table).MouseOut", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-out: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-out: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-out: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseOut() + return arg0 + }, + }, + // mouse-up response to desktop mouse event + // + // Args: + // * recv - Go(*widget.Table) + // * 1 - Go(*desktop.MouseEvent) + "Go(*widget.Table)//mouse-up": { + Doc: "(*widget.Table).MouseUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-up: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-up: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//mouse-up: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseUp(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Table) + // * pos - Go(fyne.Position) + "Go(*widget.Table)//move": { + Doc: "(*widget.Table).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//move: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-selected - fn { Go(widget.TableCellID) } + // Result: + // * fn { Go(widget.TableCellID) } + "Go(*widget.Table)//on-selected!": { + Doc: "Set *widget.Table OnSelected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-selected!: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-selected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-selected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.TableCellID) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-selected!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.TableCellID) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*widget.TableCellID)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-selected!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-selected!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnSelected = newVal + return arg0 + }, + }, + // Result: + // * fn { Go(widget.TableCellID) } + "Go(*widget.Table)//on-selected?": { + Doc: "Get *widget.Table OnSelected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-selected?: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-selected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-selected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.TableCellID + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TableCellID); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-selected?: arg 1: " + "expected native of type *widget.TableCellID, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-selected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.OnSelected(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-unselected - fn { Go(widget.TableCellID) } + // Result: + // * fn { Go(widget.TableCellID) } + "Go(*widget.Table)//on-unselected!": { + Doc: "Set *widget.Table OnUnselected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-unselected!: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-unselected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-unselected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.TableCellID) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-unselected!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.TableCellID) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*widget.TableCellID)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-unselected!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-unselected!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnUnselected = newVal + return arg0 + }, + }, + // Result: + // * fn { Go(widget.TableCellID) } + "Go(*widget.Table)//on-unselected?": { + Doc: "Get *widget.Table OnUnselected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-unselected?: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-unselected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-unselected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.TableCellID + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TableCellID); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-unselected?: arg 1: " + "expected native of type *widget.TableCellID, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//on-unselected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.OnUnselected(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Table) + // Result: + // * Go(fyne.position) + "Go(*widget.Table)//position": { + Doc: "(*widget.Table).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//position: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Table) + "Go(*widget.Table)//refresh": { + Doc: "(*widget.Table).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//refresh: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // refresh-item refreshes a single item, specified by the item ID passed in. + // + // Since: 2.4 + // + // Args: + // * recv - Go(*widget.Table) + // * id - Go(widget.TableCellID) + "Go(*widget.Table)//refresh-item": { + Doc: "(*widget.Table).RefreshItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//refresh-item: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//refresh-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//refresh-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.TableCellID + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TableCellID); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//refresh-item: arg 2: " + "expected native of type *widget.TableCellID, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//refresh-item: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RefreshItem(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Table) + // * size - Go(fyne.Size) + "Go(*widget.Table)//resize": { + Doc: "(*widget.Table).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//resize: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // scroll-to will scroll to the given cell without changing the selection. + // Attempting to scroll beyond the limits of the table will scroll to + // the edge of the table instead. + // + // Since: 2.1 + // + // Args: + // * recv - Go(*widget.Table) + // * id - Go(widget.TableCellID) + "Go(*widget.Table)//scroll-to": { + Doc: "(*widget.Table).ScrollTo", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.TableCellID + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TableCellID); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to: arg 2: " + "expected native of type *widget.TableCellID, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ScrollTo(arg1Val) + return arg0 + }, + }, + // scroll-to-bottom scrolls to the last row in the table + // + // Since: 2.1 + // + // Args: + // * recv - Go(*widget.Table) + "Go(*widget.Table)//scroll-to-bottom": { + Doc: "(*widget.Table).ScrollToBottom", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to-bottom: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to-bottom: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to-bottom: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ScrollToBottom() + return arg0 + }, + }, + // scroll-to-leading scrolls horizontally to the leading edge of the table + // + // Since: 2.1 + // + // Args: + // * recv - Go(*widget.Table) + "Go(*widget.Table)//scroll-to-leading": { + Doc: "(*widget.Table).ScrollToLeading", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to-leading: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to-leading: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to-leading: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ScrollToLeading() + return arg0 + }, + }, + // scroll-to-top scrolls to the first row in the table + // + // Since: 2.1 + // + // Args: + // * recv - Go(*widget.Table) + "Go(*widget.Table)//scroll-to-top": { + Doc: "(*widget.Table).ScrollToTop", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to-top: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to-top: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to-top: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ScrollToTop() + return arg0 + }, + }, + // scroll-to-trailing scrolls horizontally to the trailing edge of the table + // + // Since: 2.1 + // + // Args: + // * recv - Go(*widget.Table) + "Go(*widget.Table)//scroll-to-trailing": { + Doc: "(*widget.Table).ScrollToTrailing", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to-trailing: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to-trailing: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//scroll-to-trailing: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ScrollToTrailing() + return arg0 + }, + }, + // select will mark the specified cell as selected. + // + // Args: + // * recv - Go(*widget.Table) + // * id - Go(widget.TableCellID) + "Go(*widget.Table)//select": { + Doc: "(*widget.Table).Select", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//select: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//select: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//select: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.TableCellID + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TableCellID); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//select: arg 2: " + "expected native of type *widget.TableCellID, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//select: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Select(arg1Val) + return arg0 + }, + }, + // set-column-width supports changing the width of the specified column. Columns normally take the width of the template + // cell returned from the CreateCell callback. The width parameter uses the same units as a fyne.Size type and refers + // to the internal content width not including the divider size. + // + // Since: 1.4.1 + // + // Args: + // * recv - Go(*widget.Table) + // * id - integer + // * width - decimal + "Go(*widget.Table)//set-column-width": { + Doc: "(*widget.Table).SetColumnWidth", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//set-column-width: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//set-column-width: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//set-column-width: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//set-column-width: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val float32 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//set-column-width: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + arg0Val.SetColumnWidth(arg1Val, arg2Val) + return arg0 + }, + }, + // set-row-height supports changing the height of the specified row. Rows normally take the height of the template + // cell returned from the CreateCell callback. The height parameter uses the same units as a fyne.Size type and refers + // to the internal content height not including the divider size. + // + // Since: 2.3 + // + // Args: + // * recv - Go(*widget.Table) + // * id - integer + // * height - decimal + "Go(*widget.Table)//set-row-height": { + Doc: "(*widget.Table).SetRowHeight", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//set-row-height: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//set-row-height: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//set-row-height: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//set-row-height: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val float32 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//set-row-height: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + arg0Val.SetRowHeight(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Table) + "Go(*widget.Table)//show": { + Doc: "(*widget.Table).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * show-header-column - bool + // Result: + // * bool + "Go(*widget.Table)//show-header-column!": { + Doc: "Set *widget.Table ShowHeaderColumn value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show-header-column!: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show-header-column!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show-header-column!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show-header-column!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.ShowHeaderColumn = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Table)//show-header-column?": { + Doc: "Get *widget.Table ShowHeaderColumn value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show-header-column?: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show-header-column?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show-header-column?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.ShowHeaderColumn)) + return resObj + }, + }, + // Args: + // * show-header-row - bool + // Result: + // * bool + "Go(*widget.Table)//show-header-row!": { + Doc: "Set *widget.Table ShowHeaderRow value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show-header-row!: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show-header-row!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show-header-row!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show-header-row!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.ShowHeaderRow = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Table)//show-header-row?": { + Doc: "Get *widget.Table ShowHeaderRow value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show-header-row?: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show-header-row?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//show-header-row?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.ShowHeaderRow)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Table) + // Result: + // * Go(fyne.size) + "Go(*widget.Table)//size": { + Doc: "(*widget.Table).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//size: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * sticky-column-count - integer + // Result: + // * integer + "Go(*widget.Table)//sticky-column-count!": { + Doc: "Set *widget.Table StickyColumnCount value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//sticky-column-count!: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//sticky-column-count!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//sticky-column-count!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal int + if vc, ok := arg1.(env.Integer); ok { + newVal = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//sticky-column-count!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.StickyColumnCount = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Table)//sticky-column-count?": { + Doc: "Get *widget.Table StickyColumnCount value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//sticky-column-count?: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//sticky-column-count?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//sticky-column-count?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(self.StickyColumnCount)) + return resObj + }, + }, + // Args: + // * sticky-row-count - integer + // Result: + // * integer + "Go(*widget.Table)//sticky-row-count!": { + Doc: "Set *widget.Table StickyRowCount value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//sticky-row-count!: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//sticky-row-count!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//sticky-row-count!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal int + if vc, ok := arg1.(env.Integer); ok { + newVal = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//sticky-row-count!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.StickyRowCount = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.Table)//sticky-row-count?": { + Doc: "Get *widget.Table StickyRowCount value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//sticky-row-count?: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//sticky-row-count?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//sticky-row-count?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(self.StickyRowCount)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Table) + // * e - Go(*fyne.PointEvent) + "Go(*widget.Table)//tapped": { + Doc: "(*widget.Table).Tapped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//tapped: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//tapped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//tapped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//tapped: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//tapped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//tapped: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Tapped(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Table) + // Result: + // * Go(fyne.theme) + "Go(*widget.Table)//theme": { + Doc: "(*widget.Table).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//theme: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // touch-cancel response to mobile touch event + // + // Args: + // * recv - Go(*widget.Table) + // * 1 - Go(*mobile.TouchEvent) + "Go(*widget.Table)//touch-cancel": { + Doc: "(*widget.Table).TouchCancel", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-cancel: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-cancel: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-cancel: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *mobile.TouchEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-cancel: arg 2: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-cancel: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-cancel: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TouchCancel(arg1Val) + return arg0 + }, + }, + // touch-down response to mobile touch event + // + // Args: + // * recv - Go(*widget.Table) + // * e - Go(*mobile.TouchEvent) + "Go(*widget.Table)//touch-down": { + Doc: "(*widget.Table).TouchDown", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-down: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-down: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-down: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *mobile.TouchEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-down: arg 2: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-down: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-down: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TouchDown(arg1Val) + return arg0 + }, + }, + // touch-up response to mobile touch event + // + // Args: + // * recv - Go(*widget.Table) + // * 1 - Go(*mobile.TouchEvent) + "Go(*widget.Table)//touch-up": { + Doc: "(*widget.Table).TouchUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-up: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *mobile.TouchEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-up: arg 2: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//touch-up: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TouchUp(arg1Val) + return arg0 + }, + }, + // typed-key is called if a key event happens while this Table is focused. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Table) + // * event - Go(*fyne.KeyEvent) + "Go(*widget.Table)//typed-key": { + Doc: "(*widget.Table).TypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//typed-key: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//typed-key: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//typed-key: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedKey(arg1Val) + return arg0 + }, + }, + // typed-rune is called if a text event happens while this Table is focused. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Table) + // * - - Go(rune) + "Go(*widget.Table)//typed-rune": { + Doc: "(*widget.Table).TypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//typed-rune: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//typed-rune: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//typed-rune: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedRune(arg1Val) + return arg0 + }, + }, + // unselect will mark the cell provided by id as unselected. + // + // Args: + // * recv - Go(*widget.Table) + // * id - Go(widget.TableCellID) + "Go(*widget.Table)//unselect": { + Doc: "(*widget.Table).Unselect", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//unselect: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//unselect: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//unselect: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.TableCellID + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TableCellID); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//unselect: arg 2: " + "expected native of type *widget.TableCellID, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//unselect: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unselect(arg1Val) + return arg0 + }, + }, + // unselect-all will mark all cells as unselected. + // + // Since: 2.1 + // + // Args: + // * recv - Go(*widget.Table) + "Go(*widget.Table)//unselect-all": { + Doc: "(*widget.Table).UnselectAll", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//unselect-all: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//unselect-all: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//unselect-all: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.UnselectAll() + return arg0 + }, + }, + // Args: + // * update-cell - fn { Go(widget.TableCellID) Go(fyne.CanvasObject) } + // Result: + // * fn { Go(widget.TableCellID) Go(fyne.CanvasObject) } + "Go(*widget.Table)//update-cell!": { + Doc: "Set *widget.Table UpdateCell value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-cell!: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-cell!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-cell!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.TableCellID, fyne.CanvasObject) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-cell!: arg 2: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.TableCellID, farg1 fyne.CanvasObject) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*widget.TableCellID)") + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-cell!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-cell!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.UpdateCell = newVal + return arg0 + }, + }, + // Result: + // * fn { Go(widget.TableCellID) Go(fyne.CanvasObject) } + "Go(*widget.Table)//update-cell?": { + Doc: "Get *widget.Table UpdateCell value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-cell?: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-cell?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-cell?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.TableCellID + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TableCellID); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-cell?: arg 1: " + "expected native of type *widget.TableCellID, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-cell?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-cell?: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-cell?: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-cell?: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-cell?: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.UpdateCell(arg0Val, arg1Val) + return nil + }, 2, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * update-header - fn { Go(widget.TableCellID) Go(fyne.CanvasObject) } + // Result: + // * fn { Go(widget.TableCellID) Go(fyne.CanvasObject) } + "Go(*widget.Table)//update-header!": { + Doc: "Set *widget.Table UpdateHeader value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-header!: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-header!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-header!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.TableCellID, fyne.CanvasObject) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-header!: arg 2: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.TableCellID, farg1 fyne.CanvasObject) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*widget.TableCellID)") + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-header!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-header!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.UpdateHeader = newVal + return arg0 + }, + }, + // Result: + // * fn { Go(widget.TableCellID) Go(fyne.CanvasObject) } + "Go(*widget.Table)//update-header?": { + Doc: "Get *widget.Table UpdateHeader value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-header?: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-header?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-header?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.TableCellID + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TableCellID); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-header?: arg 1: " + "expected native of type *widget.TableCellID, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-header?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-header?: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-header?: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-header?: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//update-header?: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.UpdateHeader(arg0Val, arg1Val) + return nil + }, 2, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Table) + // Result: + // * bool + "Go(*widget.Table)//visible": { + Doc: "(*widget.Table).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Table + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Table); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//visible: arg 1: " + "expected native of type *widget.Table, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Table)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * col - integer + // Result: + // * integer + "Go(*widget.TableCellID)//col!": { + Doc: "Set *widget.TableCellID Col value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TableCellID + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TableCellID); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TableCellID)//col!: arg 1: " + "expected native of type *widget.TableCellID, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TableCellID)//col!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TableCellID)//col!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal int + if vc, ok := arg1.(env.Integer); ok { + newVal = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TableCellID)//col!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Col = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.TableCellID)//col?": { + Doc: "Get *widget.TableCellID Col value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TableCellID + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TableCellID); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TableCellID)//col?: arg 1: " + "expected native of type *widget.TableCellID, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TableCellID)//col?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TableCellID)//col?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(self.Col)) + return resObj + }, + }, + // Args: + // * row - integer + // Result: + // * integer + "Go(*widget.TableCellID)//row!": { + Doc: "Set *widget.TableCellID Row value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TableCellID + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TableCellID); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TableCellID)//row!: arg 1: " + "expected native of type *widget.TableCellID, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TableCellID)//row!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TableCellID)//row!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal int + if vc, ok := arg1.(env.Integer); ok { + newVal = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TableCellID)//row!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Row = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.TableCellID)//row?": { + Doc: "Get *widget.TableCellID Row value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TableCellID + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TableCellID); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TableCellID)//row?: arg 1: " + "expected native of type *widget.TableCellID, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TableCellID)//row?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TableCellID)//row?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(self.Row)) + return resObj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.TextGrid)//base-widget!": { + Doc: "Set *widget.TextGrid BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//base-widget!: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.TextGrid)//base-widget?": { + Doc: "Get *widget.TextGrid BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//base-widget?: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to it's renderer + // + // Args: + // * recv - Go(*widget.TextGrid) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.TextGrid)//create-renderer": { + Doc: "(*widget.TextGrid).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//create-renderer: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.TextGrid) + // * wid - Go(fyne.Widget) + "Go(*widget.TextGrid)//extend-base-widget": { + Doc: "(*widget.TextGrid).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//extend-base-widget: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.TextGrid)//hidden!": { + Doc: "Set *widget.TextGrid Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//hidden!: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.TextGrid)//hidden?": { + Doc: "Get *widget.TextGrid Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//hidden?: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.TextGrid) + "Go(*widget.TextGrid)//hide": { + Doc: "(*widget.TextGrid).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//hide: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // min-size returns the smallest size this widget can shrink to + // + // Args: + // * recv - Go(*widget.TextGrid) + // Result: + // * Go(fyne.Size) + "Go(*widget.TextGrid)//min-size": { + Doc: "(*widget.TextGrid).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//min-size: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.TextGrid) + // * pos - Go(fyne.Position) + "Go(*widget.TextGrid)//move": { + Doc: "(*widget.TextGrid).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//move: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.TextGrid) + // Result: + // * Go(fyne.position) + "Go(*widget.TextGrid)//position": { + Doc: "(*widget.TextGrid).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//position: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.TextGrid) + "Go(*widget.TextGrid)//refresh": { + Doc: "(*widget.TextGrid).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//refresh: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // resize is called when this widget changes size. We should make sure that we refresh cells. + // + // Args: + // * recv - Go(*widget.TextGrid) + // * size - Go(fyne.Size) + "Go(*widget.TextGrid)//resize": { + Doc: "(*widget.TextGrid).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//resize: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // row returns a copy of the content in a specified row as a TextGridrow. + // If the index is out of bounds it returns an empty row object. + // + // Args: + // * recv - Go(*widget.TextGrid) + // * row - integer + // Result: + // * Go(widget.TextGridrow) + "Go(*widget.TextGrid)//row": { + Doc: "(*widget.TextGrid).Row", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//row: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//row: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//row: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//row: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.Row(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*widget.TextGridRow)") + return res0Obj + }, + }, + // row-text returns a string representation of the content at the row specified. + // If the index is out of bounds it returns an empty string. + // + // Args: + // * recv - Go(*widget.TextGrid) + // * row - integer + // Result: + // * string + "Go(*widget.TextGrid)//row-text": { + Doc: "(*widget.TextGrid).RowText", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//row-text: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//row-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//row-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//row-text: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.RowText(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * rows - block[Go(widget.TextGridRow)] + // Result: + // * block[Go(widget.TextGridRow)] + "Go(*widget.TextGrid)//rows!": { + Doc: "Set *widget.TextGrid Rows value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//rows!: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//rows!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//rows!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []widget.TextGridRow + switch v := arg1.(type) { + case env.Block: + newVal = make([]widget.TextGridRow, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGridRow); ok { + (*iv) = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//rows!: arg 2: " + "block item: " + "expected native of type *widget.TextGridRow, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//rows!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//rows!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//rows!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Rows = newVal + return arg0 + }, + }, + // Result: + // * block[Go(widget.TextGridRow)] + "Go(*widget.TextGrid)//rows?": { + Doc: "Get *widget.TextGrid Rows value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//rows?: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//rows?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//rows?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Rows)) + for i, it := range self.Rows { + items[i] = *env.NewNative(ps.Idx, &it, "Go(*widget.TextGridRow)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // set-cell sets a grid data to the cell at named row and column. + // + // Args: + // * recv - Go(*widget.TextGrid) + // * row - integer + // * col - integer + // * cell - Go(widget.TextGridCell) + "Go(*widget.TextGrid)//set-cell": { + Doc: "(*widget.TextGrid).SetCell", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-cell: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-cell: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-cell: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-cell: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val int + if vc, ok := arg2.(env.Integer); ok { + arg2Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-cell: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val widget.TextGridCell + switch v := arg3.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGridCell); ok { + arg3Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-cell: arg 4: " + "expected native of type *widget.TextGridCell, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-cell: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetCell(arg1Val, arg2Val, arg3Val) + return arg0 + }, + }, + // set-row updates the specified row of the grid's contents using the specified content and style and then refreshes. + // If the row is beyond the end of the current buffer it will be expanded. + // Tab characters are not padded with spaces. + // + // Args: + // * recv - Go(*widget.TextGrid) + // * row - integer + // * content - Go(widget.TextGridRow) + "Go(*widget.TextGrid)//set-row": { + Doc: "(*widget.TextGrid).SetRow", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-row: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-row: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-row: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-row: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val widget.TextGridRow + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGridRow); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-row: arg 3: " + "expected native of type *widget.TextGridRow, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-row: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetRow(arg1Val, arg2Val) + return arg0 + }, + }, + // set-row-style sets a grid style to all the cells cell at the specified row. + // Any cells in this row with their own style will override this value when displayed. + // + // Args: + // * recv - Go(*widget.TextGrid) + // * row - integer + // * style - Go(widget.TextGridStyle) + "Go(*widget.TextGrid)//set-row-style": { + Doc: "(*widget.TextGrid).SetRowStyle", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-row-style: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-row-style: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-row-style: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-row-style: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val widget.TextGridStyle + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_widget_TextGridStyle(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-row-style: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.TextGridStyle); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-row-style: arg 3: " + "expected native of type widget.TextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-row-style: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-row-style: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetRowStyle(arg1Val, arg2Val) + return arg0 + }, + }, + // set-rune sets a character to the cell at named row and column. + // + // Args: + // * recv - Go(*widget.TextGrid) + // * row - integer + // * col - integer + // * r - Go(rune) + "Go(*widget.TextGrid)//set-rune": { + Doc: "(*widget.TextGrid).SetRune", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-rune: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-rune: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val int + if vc, ok := arg2.(env.Integer); ok { + arg2Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-rune: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val rune + switch v := arg3.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-rune: arg 4: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-rune: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetRune(arg1Val, arg2Val, arg3Val) + return arg0 + }, + }, + // set-style sets a grid style to the cell at named row and column. + // + // Args: + // * recv - Go(*widget.TextGrid) + // * row - integer + // * col - integer + // * style - Go(widget.TextGridStyle) + "Go(*widget.TextGrid)//set-style": { + Doc: "(*widget.TextGrid).SetStyle", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-style: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-style: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-style: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-style: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val int + if vc, ok := arg2.(env.Integer); ok { + arg2Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-style: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val widget.TextGridStyle + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_widget_TextGridStyle(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-style: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.TextGridStyle); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-style: arg 4: " + "expected native of type widget.TextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-style: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-style: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetStyle(arg1Val, arg2Val, arg3Val) + return arg0 + }, + }, + // set-text updates the buffer of this textgrid to contain the specified text. + // New lines and columns will be added as required. Lines are separated by '\n'. + // The grid will use default text style and any previous content and style will be removed. + // Tab characters are padded with spaces to the next tab stop. + // + // Args: + // * recv - Go(*widget.TextGrid) + // * text - string + "Go(*widget.TextGrid)//set-text": { + Doc: "(*widget.TextGrid).SetText", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-text: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//set-text: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetText(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.TextGrid) + "Go(*widget.TextGrid)//show": { + Doc: "(*widget.TextGrid).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * show-line-numbers - bool + // Result: + // * bool + "Go(*widget.TextGrid)//show-line-numbers!": { + Doc: "Set *widget.TextGrid ShowLineNumbers value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show-line-numbers!: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show-line-numbers!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show-line-numbers!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show-line-numbers!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.ShowLineNumbers = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.TextGrid)//show-line-numbers?": { + Doc: "Get *widget.TextGrid ShowLineNumbers value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show-line-numbers?: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show-line-numbers?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show-line-numbers?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.ShowLineNumbers)) + return resObj + }, + }, + // Args: + // * show-whitespace - bool + // Result: + // * bool + "Go(*widget.TextGrid)//show-whitespace!": { + Doc: "Set *widget.TextGrid ShowWhitespace value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show-whitespace!: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show-whitespace!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show-whitespace!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show-whitespace!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.ShowWhitespace = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.TextGrid)//show-whitespace?": { + Doc: "Get *widget.TextGrid ShowWhitespace value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show-whitespace?: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show-whitespace?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//show-whitespace?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.ShowWhitespace)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.TextGrid) + // Result: + // * Go(fyne.size) + "Go(*widget.TextGrid)//size": { + Doc: "(*widget.TextGrid).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//size: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * tab-width - integer + // Result: + // * integer + "Go(*widget.TextGrid)//tab-width!": { + Doc: "Set *widget.TextGrid TabWidth value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//tab-width!: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//tab-width!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//tab-width!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal int + if vc, ok := arg1.(env.Integer); ok { + newVal = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//tab-width!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.TabWidth = newVal + return arg0 + }, + }, + // Result: + // * integer + "Go(*widget.TextGrid)//tab-width?": { + Doc: "Get *widget.TextGrid TabWidth value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//tab-width?: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//tab-width?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//tab-width?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(int64(self.TabWidth)) + return resObj + }, + }, + // text returns the contents of the buffer as a single string (with no style information). + // It reconstructs the lines by joining with a `\n` character. + // Tab characters have padded spaces removed. + // + // Args: + // * recv - Go(*widget.textGrid) + // Result: + // * string + "Go(*widget.TextGrid)//text": { + Doc: "(*widget.TextGrid).Text", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//text: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Text() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.TextGrid) + // Result: + // * Go(fyne.theme) + "Go(*widget.TextGrid)//theme": { + Doc: "(*widget.TextGrid).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//theme: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.TextGrid) + // Result: + // * bool + "Go(*widget.TextGrid)//visible": { + Doc: "(*widget.TextGrid).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextGrid + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGrid); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//visible: arg 1: " + "expected native of type *widget.TextGrid, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGrid)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * rune - Go(rune) + // Result: + // * Go(rune) + "Go(*widget.TextGridCell)//rune!": { + Doc: "Set *widget.TextGridCell Rune value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGridCell + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGridCell); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//rune!: arg 1: " + "expected native of type *widget.TextGridCell, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//rune!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//rune!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//rune!: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//rune!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Rune = newVal + return arg0 + }, + }, + // Result: + // * Go(rune) + "Go(*widget.TextGridCell)//rune?": { + Doc: "Get *widget.TextGridCell Rune value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGridCell + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGridCell); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//rune?: arg 1: " + "expected native of type *widget.TextGridCell, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//rune?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//rune?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, self.Rune, "Go(rune)") + return resObj + }, + }, + // Args: + // * style - Go(widget.TextGridStyle) + // Result: + // * Go(widget.TextGridStyle) + "Go(*widget.TextGridCell)//style!": { + Doc: "Set *widget.TextGridCell Style value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGridCell + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGridCell); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//style!: arg 1: " + "expected native of type *widget.TextGridCell, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//style!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//style!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal widget.TextGridStyle + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_widget_TextGridStyle(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//style!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.TextGridStyle); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//style!: arg 2: " + "expected native of type widget.TextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//style!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//style!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Style = newVal + return arg0 + }, + }, + // Result: + // * Go(widget.TextGridStyle) + "Go(*widget.TextGridCell)//style?": { + Doc: "Get *widget.TextGridCell Style value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGridCell + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGridCell); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//style?: arg 1: " + "expected native of type *widget.TextGridCell, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//style?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridCell)//style?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Style, "Go(widget.TextGridStyle)") + return resObj + }, + }, + // Args: + // * cells - block[Go(widget.TextGridCell)] + // Result: + // * block[Go(widget.TextGridCell)] + "Go(*widget.TextGridRow)//cells!": { + Doc: "Set *widget.TextGridRow Cells value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGridRow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGridRow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//cells!: arg 1: " + "expected native of type *widget.TextGridRow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//cells!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//cells!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []widget.TextGridCell + switch v := arg1.(type) { + case env.Block: + newVal = make([]widget.TextGridCell, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGridCell); ok { + (*iv) = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//cells!: arg 2: " + "block item: " + "expected native of type *widget.TextGridCell, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//cells!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//cells!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//cells!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Cells = newVal + return arg0 + }, + }, + // Result: + // * block[Go(widget.TextGridCell)] + "Go(*widget.TextGridRow)//cells?": { + Doc: "Get *widget.TextGridRow Cells value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGridRow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGridRow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//cells?: arg 1: " + "expected native of type *widget.TextGridRow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//cells?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//cells?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Cells)) + for i, it := range self.Cells { + items[i] = *env.NewNative(ps.Idx, &it, "Go(*widget.TextGridCell)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // Args: + // * style - Go(widget.TextGridStyle) + // Result: + // * Go(widget.TextGridStyle) + "Go(*widget.TextGridRow)//style!": { + Doc: "Set *widget.TextGridRow Style value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGridRow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGridRow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//style!: arg 1: " + "expected native of type *widget.TextGridRow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//style!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//style!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal widget.TextGridStyle + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_widget_TextGridStyle(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//style!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.TextGridStyle); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//style!: arg 2: " + "expected native of type widget.TextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//style!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//style!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Style = newVal + return arg0 + }, + }, + // Result: + // * Go(widget.TextGridStyle) + "Go(*widget.TextGridRow)//style?": { + Doc: "Get *widget.TextGridRow Style value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextGridRow + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextGridRow); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//style?: arg 1: " + "expected native of type *widget.TextGridRow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//style?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextGridRow)//style?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Style, "Go(widget.TextGridStyle)") + return resObj + }, + }, + // inline should return true if this text can be included within other elements, or false if it creates a new block. + // + // Args: + // * recv - Go(*widget.TextSegment) + // Result: + // * bool + "Go(*widget.TextSegment)//inline": { + Doc: "(*widget.TextSegment).Inline", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//inline: arg 1: " + "expected native of type *widget.TextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//inline: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//inline: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Inline() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // select tells the segment that the user is selecting the content between the two positions. + // + // Args: + // * recv - Go(*widget.TextSegment) + // * begin - Go(fyne.Position) + // * end - Go(fyne.Position) + "Go(*widget.TextSegment)//select": { + Doc: "(*widget.TextSegment).Select", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//select: arg 1: " + "expected native of type *widget.TextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//select: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//select: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//select: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//select: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Position + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//select: arg 3: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//select: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Select(arg1Val, arg2Val) + return arg0 + }, + }, + // selected-text should return the text representation of any content currently selected through the Select call. + // + // Args: + // * recv - Go(*widget.TextSegment) + // Result: + // * string + "Go(*widget.TextSegment)//selected-text": { + Doc: "(*widget.TextSegment).SelectedText", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//selected-text: arg 1: " + "expected native of type *widget.TextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//selected-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//selected-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.SelectedText() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * style - Go(widget.RichTextStyle) + // Result: + // * Go(widget.RichTextStyle) + "Go(*widget.TextSegment)//style!": { + Doc: "Set *widget.TextSegment Style value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//style!: arg 1: " + "expected native of type *widget.TextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//style!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//style!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.RichTextStyle + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.RichTextStyle); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//style!: arg 2: " + "expected native of type *widget.RichTextStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//style!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//style!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Style = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.RichTextStyle) + "Go(*widget.TextSegment)//style?": { + Doc: "Get *widget.TextSegment Style value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//style?: arg 1: " + "expected native of type *widget.TextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//style?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//style?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.Style, "Go(*widget.RichTextStyle)") + return resObj + }, + }, + // Args: + // * text - string + // Result: + // * string + "Go(*widget.TextSegment)//text!": { + Doc: "Set *widget.TextSegment Text value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//text!: arg 1: " + "expected native of type *widget.TextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//text!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//text!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal string + if vc, ok := arg1.(env.String); ok { + newVal = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//text!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Text = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.TextSegment)//text?": { + Doc: "Get *widget.TextSegment Text value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.TextSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextSegment); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//text?: arg 1: " + "expected native of type *widget.TextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//text?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//text?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(self.Text) + return resObj + }, + }, + // textual returns the content of this segment rendered to plain text. + // + // Args: + // * recv - Go(*widget.TextSegment) + // Result: + // * string + "Go(*widget.TextSegment)//textual": { + Doc: "(*widget.TextSegment).Textual", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//textual: arg 1: " + "expected native of type *widget.TextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//textual: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//textual: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Textual() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // unselect tells the segment that the user is has cancelled the previous selection. + // + // Args: + // * recv - Go(*widget.TextSegment) + "Go(*widget.TextSegment)//unselect": { + Doc: "(*widget.TextSegment).Unselect", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//unselect: arg 1: " + "expected native of type *widget.TextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//unselect: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//unselect: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unselect() + return arg0 + }, + }, + // update applies the current state of this text segment to an existing visual. + // + // Args: + // * recv - Go(*widget.TextSegment) + // * o - Go(fyne.CanvasObject) + "Go(*widget.TextSegment)//update": { + Doc: "(*widget.TextSegment).Update", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//update: arg 1: " + "expected native of type *widget.TextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//update: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//update: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//update: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//update: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//update: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//update: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Update(arg1Val) + return arg0 + }, + }, + // visual returns the graphical elements required to render this segment. + // + // Args: + // * recv - Go(*widget.TextSegment) + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.TextSegment)//visual": { + Doc: "(*widget.TextSegment).Visual", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.TextSegment + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.TextSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//visual: arg 1: " + "expected native of type *widget.TextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//visual: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.TextSegment)//visual: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visual() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // append a new ToolbarItem to the end of this Toolbar + // + // Args: + // * recv - Go(*widget.Toolbar) + // * item - Go(widget.ToolbarItem) + "Go(*widget.Toolbar)//append": { + Doc: "(*widget.Toolbar).Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//append: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.ToolbarItem + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_widget_ToolbarItem(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//append: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.ToolbarItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//append: arg 2: " + "expected native of type widget.ToolbarItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//append: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//append: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Append(arg1Val) + return arg0 + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Toolbar)//base-widget!": { + Doc: "Set *widget.Toolbar BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//base-widget!: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Toolbar)//base-widget?": { + Doc: "Get *widget.Toolbar BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//base-widget?: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer + // + // Args: + // * recv - Go(*widget.Toolbar) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Toolbar)//create-renderer": { + Doc: "(*widget.Toolbar).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//create-renderer: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Toolbar) + // * wid - Go(fyne.Widget) + "Go(*widget.Toolbar)//extend-base-widget": { + Doc: "(*widget.Toolbar).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//extend-base-widget: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Toolbar)//hidden!": { + Doc: "Set *widget.Toolbar Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//hidden!: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Toolbar)//hidden?": { + Doc: "Get *widget.Toolbar Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//hidden?: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Toolbar) + "Go(*widget.Toolbar)//hide": { + Doc: "(*widget.Toolbar).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//hide: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * items - block[Go(widget.ToolbarItem)] + // Result: + // * block[Go(widget.ToolbarItem)] + "Go(*widget.Toolbar)//items!": { + Doc: "Set *widget.Toolbar Items value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//items!: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//items!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//items!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal []widget.ToolbarItem + switch v := arg1.(type) { + case env.Block: + newVal = make([]widget.ToolbarItem, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &newVal[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_widget_ToolbarItem(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//items!: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.ToolbarItem); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//items!: arg 2: " + "block item: " + "expected native of type widget.ToolbarItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//items!: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//items!: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//items!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//items!: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + self.Items = newVal + return arg0 + }, + }, + // Result: + // * block[Go(widget.ToolbarItem)] + "Go(*widget.Toolbar)//items?": { + Doc: "Get *widget.Toolbar Items value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//items?: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//items?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//items?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + { + items := make([]env.Object, len(self.Items)) + for i, it := range self.Items { + items[i] = ifaceToNative(ps.Idx, it, "Go(widget.ToolbarItem)") + } + resObj = *env.NewBlock(*env.NewTSeries(items)) + } + return resObj + }, + }, + // min-size returns the size that this widget should not shrink below + // + // Args: + // * recv - Go(*widget.Toolbar) + // Result: + // * Go(fyne.Size) + "Go(*widget.Toolbar)//min-size": { + Doc: "(*widget.Toolbar).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//min-size: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Toolbar) + // * pos - Go(fyne.Position) + "Go(*widget.Toolbar)//move": { + Doc: "(*widget.Toolbar).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//move: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Toolbar) + // Result: + // * Go(fyne.position) + "Go(*widget.Toolbar)//position": { + Doc: "(*widget.Toolbar).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//position: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // prepend a new ToolbarItem to the start of this Toolbar + // + // Args: + // * recv - Go(*widget.Toolbar) + // * item - Go(widget.ToolbarItem) + "Go(*widget.Toolbar)//prepend": { + Doc: "(*widget.Toolbar).Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//prepend: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.ToolbarItem + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_widget_ToolbarItem(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//prepend: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.ToolbarItem); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//prepend: arg 2: " + "expected native of type widget.ToolbarItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//prepend: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//prepend: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Prepend(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Toolbar) + "Go(*widget.Toolbar)//refresh": { + Doc: "(*widget.Toolbar).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//refresh: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Toolbar) + // * size - Go(fyne.Size) + "Go(*widget.Toolbar)//resize": { + Doc: "(*widget.Toolbar).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//resize: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Toolbar) + "Go(*widget.Toolbar)//show": { + Doc: "(*widget.Toolbar).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//show: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Toolbar) + // Result: + // * Go(fyne.size) + "Go(*widget.Toolbar)//size": { + Doc: "(*widget.Toolbar).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//size: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Toolbar) + // Result: + // * Go(fyne.theme) + "Go(*widget.Toolbar)//theme": { + Doc: "(*widget.Toolbar).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//theme: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Toolbar) + // Result: + // * bool + "Go(*widget.Toolbar)//visible": { + Doc: "(*widget.Toolbar).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Toolbar + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Toolbar); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//visible: arg 1: " + "expected native of type *widget.Toolbar, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Toolbar)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // disable this ToolbarAction so that it cannot be interacted with, updating any style appropriately. + // + // Since: 2.5 + // + // Args: + // * recv - Go(*widget.ToolbarAction) + "Go(*widget.ToolbarAction)//disable": { + Doc: "(*widget.ToolbarAction).Disable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ToolbarAction + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ToolbarAction); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//disable: arg 1: " + "expected native of type *widget.ToolbarAction, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//disable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//disable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Disable() + return arg0 + }, + }, + // disabled returns true if this ToolbarAction is currently disabled or false if it can currently be interacted with. + // + // Since: 2.5 + // + // Args: + // * recv - Go(*widget.ToolbarAction) + // Result: + // * bool + "Go(*widget.ToolbarAction)//disabled": { + Doc: "(*widget.ToolbarAction).Disabled", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ToolbarAction + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ToolbarAction); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//disabled: arg 1: " + "expected native of type *widget.ToolbarAction, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//disabled: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//disabled: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Disabled() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // enable this ToolbarAction, updating any style or features appropriately. + // + // Since: 2.5 + // + // Args: + // * recv - Go(*widget.ToolbarAction) + "Go(*widget.ToolbarAction)//enable": { + Doc: "(*widget.ToolbarAction).Enable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ToolbarAction + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ToolbarAction); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//enable: arg 1: " + "expected native of type *widget.ToolbarAction, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//enable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//enable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Enable() + return arg0 + }, + }, + // Args: + // * icon - Go(fyne.Resource) + // Result: + // * Go(fyne.Resource) + "Go(*widget.ToolbarAction)//icon!": { + Doc: "Set *widget.ToolbarAction Icon value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ToolbarAction + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ToolbarAction); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//icon!: arg 1: " + "expected native of type *widget.ToolbarAction, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//icon!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//icon!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + newVal, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//icon!: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//icon!: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//icon!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//icon!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.Icon = newVal + return arg0 + }, + }, + // Result: + // * Go(fyne.Resource) + "Go(*widget.ToolbarAction)//icon?": { + Doc: "Get *widget.ToolbarAction Icon value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ToolbarAction + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ToolbarAction); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//icon?: arg 1: " + "expected native of type *widget.ToolbarAction, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//icon?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//icon?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = ifaceToNative(ps.Idx, self.Icon, "Go(fyne.Resource)") + return resObj + }, + }, + // Args: + // * on-activated - fn { } + // Result: + // * fn { } + "Go(*widget.ToolbarAction)//on-activated!": { + Doc: "Set *widget.ToolbarAction OnActivated value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ToolbarAction + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ToolbarAction); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//on-activated!: arg 1: " + "expected native of type *widget.ToolbarAction, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//on-activated!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//on-activated!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//on-activated!: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//on-activated!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//on-activated!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnActivated = newVal + return arg0 + }, + }, + // Result: + // * fn { } + "Go(*widget.ToolbarAction)//on-activated?": { + Doc: "Get *widget.ToolbarAction OnActivated value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.ToolbarAction + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ToolbarAction); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//on-activated?: arg 1: " + "expected native of type *widget.ToolbarAction, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//on-activated?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//on-activated?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + self.OnActivated() + return nil + }, 0, false, false, "Returned func") + return resObj + }, + }, + // set-icon updates the icon on a ToolbarItem + // + // Since: 2.2 + // + // Args: + // * recv - Go(*widget.ToolbarAction) + // * icon - Go(fyne.Resource) + "Go(*widget.ToolbarAction)//set-icon": { + Doc: "(*widget.ToolbarAction).SetIcon", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ToolbarAction + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ToolbarAction); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//set-icon: arg 1: " + "expected native of type *widget.ToolbarAction, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//set-icon: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//set-icon: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//set-icon: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//set-icon: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//set-icon: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//set-icon: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetIcon(arg1Val) + return arg0 + }, + }, + // toolbar-object gets a button to render this ToolbarAction + // + // Args: + // * recv - Go(*widget.ToolbarAction) + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.ToolbarAction)//toolbar-object": { + Doc: "(*widget.ToolbarAction).ToolbarObject", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ToolbarAction + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ToolbarAction); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//toolbar-object: arg 1: " + "expected native of type *widget.ToolbarAction, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//toolbar-object: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarAction)//toolbar-object: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ToolbarObject() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // toolbar-object gets the visible line object for this ToolbarSeparator + // + // Args: + // * recv - Go(*widget.ToolbarSeparator) + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.ToolbarSeparator)//toolbar-object": { + Doc: "(*widget.ToolbarSeparator).ToolbarObject", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ToolbarSeparator + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ToolbarSeparator); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarSeparator)//toolbar-object: arg 1: " + "expected native of type *widget.ToolbarSeparator, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarSeparator)//toolbar-object: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarSeparator)//toolbar-object: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ToolbarObject() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // toolbar-object gets the actual spacer object for this ToolbarSpacer + // + // Args: + // * recv - Go(*widget.ToolbarSpacer) + // Result: + // * Go(fyne.CanvasObject) + "Go(*widget.ToolbarSpacer)//toolbar-object": { + Doc: "(*widget.ToolbarSpacer).ToolbarObject", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.ToolbarSpacer + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.ToolbarSpacer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarSpacer)//toolbar-object: arg 1: " + "expected native of type *widget.ToolbarSpacer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarSpacer)//toolbar-object: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.ToolbarSpacer)//toolbar-object: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ToolbarObject() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // Args: + // * base-widget - Go(widget.BaseWidget) + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Tree)//base-widget!": { + Doc: "Set *widget.Tree BaseWidget value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//base-widget!: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//base-widget!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//base-widget!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal *widget.BaseWidget + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.BaseWidget); ok { + newVal = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//base-widget!: arg 2: " + "expected native of type *widget.BaseWidget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//base-widget!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//base-widget!: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.BaseWidget = *newVal + return arg0 + }, + }, + // Result: + // * Go(widget.BaseWidget) + "Go(*widget.Tree)//base-widget?": { + Doc: "Get *widget.Tree BaseWidget value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//base-widget?: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//base-widget?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//base-widget?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewNative(ps.Idx, &self.BaseWidget, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // Args: + // * child-ui-ds - fn { string } -> block[string] + // Result: + // * fn { string } -> block[string] + "Go(*widget.Tree)//child-ui-ds!": { + Doc: "Set *widget.Tree ChildUIDs value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//child-ui-ds!: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//child-ui-ds!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//child-ui-ds!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.TreeNodeID) []widget.TreeNodeID + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//child-ui-ds!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.TreeNodeID) []widget.TreeNodeID { + var farg0Val env.Object + farg0Val = *env.NewString(string(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []widget.TreeNodeID + switch v := ps.Res.(type) { + case env.Block: + res = make([]widget.TreeNodeID, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + { + nat, natOk := it.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + (*iv) = natVal + } else { + var u string + if vc, ok := it.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Tree)//child-ui-ds!: arg 2: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + (*iv) = widget.TreeNodeID(u) + } + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Tree)//child-ui-ds!: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Tree)//child-ui-ds!: arg 2: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//child-ui-ds!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//child-ui-ds!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.ChildUIDs = newVal + return arg0 + }, + }, + // Result: + // * fn { string } -> block[string] + "Go(*widget.Tree)//child-ui-ds?": { + Doc: "Get *widget.Tree ChildUIDs value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//child-ui-ds?: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//child-ui-ds?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//child-ui-ds?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.TreeNodeID + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + arg0Val = natVal + } else { + var u string + if vc, ok := arg0.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//child-ui-ds?: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = widget.TreeNodeID(u) + } + } + res0 := self.ChildUIDs(arg0Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(string(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, 1, false, false, "Returned func") + return resObj + }, + }, + // close-all-branches closes all branches in the tree. + // + // Args: + // * recv - Go(*widget.Tree) + "Go(*widget.Tree)//close-all-branches": { + Doc: "(*widget.Tree).CloseAllBranches", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//close-all-branches: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//close-all-branches: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//close-all-branches: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.CloseAllBranches() + return arg0 + }, + }, + // close-branch closes the branch with the given TreeNodeID. + // + // Args: + // * recv - Go(*widget.Tree) + // * uid - string + "Go(*widget.Tree)//close-branch": { + Doc: "(*widget.Tree).CloseBranch", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//close-branch: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//close-branch: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//close-branch: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.TreeNodeID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + arg1Val = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//close-branch: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.TreeNodeID(u) + } + } + arg0Val.CloseBranch(arg1Val) + return arg0 + }, + }, + // Args: + // * create-node - fn { bool } -> Go(fyne.CanvasObject) + // Result: + // * fn { bool } -> Go(fyne.CanvasObject) + "Go(*widget.Tree)//create-node!": { + Doc: "Set *widget.Tree CreateNode value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//create-node!: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//create-node!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//create-node!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(bool) fyne.CanvasObject + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//create-node!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 bool) fyne.CanvasObject { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Tree)//create-node!: arg 2: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Tree)//create-node!: arg 2: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Tree)//create-node!: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Tree)//create-node!: arg 2: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//create-node!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//create-node!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.CreateNode = newVal + return arg0 + }, + }, + // Result: + // * fn { bool } -> Go(fyne.CanvasObject) + "Go(*widget.Tree)//create-node?": { + Doc: "Get *widget.Tree CreateNode value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//create-node?: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//create-node?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//create-node?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val bool + if vc, ok := arg0.(env.Integer); ok { + arg0Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//create-node?: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := self.CreateNode(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, 1, false, false, "Returned func") + return resObj + }, + }, + // create-renderer is a private method to Fyne which links this widget to its renderer. + // + // Args: + // * recv - Go(*widget.Tree) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(*widget.Tree)//create-renderer": { + Doc: "(*widget.Tree).CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//create-renderer: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Tree) + // * wid - Go(fyne.Widget) + "Go(*widget.Tree)//extend-base-widget": { + Doc: "(*widget.Tree).ExtendBaseWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//extend-base-widget: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//extend-base-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//extend-base-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//extend-base-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//extend-base-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//extend-base-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//extend-base-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ExtendBaseWidget(arg1Val) + return arg0 + }, + }, + // focus-gained is called after this Tree has gained focus. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Tree) + "Go(*widget.Tree)//focus-gained": { + Doc: "(*widget.Tree).FocusGained", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//focus-gained: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//focus-gained: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//focus-gained: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusGained() + return arg0 + }, + }, + // focus-lost is called after this Tree has lost focus. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Tree) + "Go(*widget.Tree)//focus-lost": { + Doc: "(*widget.Tree).FocusLost", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//focus-lost: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//focus-lost: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//focus-lost: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusLost() + return arg0 + }, + }, + // Args: + // * hidden - bool + // Result: + // * bool + "Go(*widget.Tree)//hidden!": { + Doc: "Set *widget.Tree Hidden value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hidden!: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hidden!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hidden!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hidden!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.Hidden = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Tree)//hidden?": { + Doc: "Get *widget.Tree Hidden value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hidden?: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hidden?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hidden?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.Hidden)) + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Tree) + "Go(*widget.Tree)//hide": { + Doc: "(*widget.Tree).Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hide: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * hide-separators - bool + // Result: + // * bool + "Go(*widget.Tree)//hide-separators!": { + Doc: "Set *widget.Tree HideSeparators value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hide-separators!: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hide-separators!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hide-separators!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal bool + if vc, ok := arg1.(env.Integer); ok { + newVal = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hide-separators!: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + self.HideSeparators = newVal + return arg0 + }, + }, + // Result: + // * bool + "Go(*widget.Tree)//hide-separators?": { + Doc: "Get *widget.Tree HideSeparators value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hide-separators?: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hide-separators?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//hide-separators?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewInteger(boolToInt64(self.HideSeparators)) + return resObj + }, + }, + // Args: + // * is-branch - fn { string } -> bool + // Result: + // * fn { string } -> bool + "Go(*widget.Tree)//is-branch!": { + Doc: "Set *widget.Tree IsBranch value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//is-branch!: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//is-branch!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//is-branch!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.TreeNodeID) bool + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//is-branch!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.TreeNodeID) bool { + var farg0Val env.Object + farg0Val = *env.NewString(string(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "Go(*widget.Tree)//is-branch!: arg 2: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//is-branch!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//is-branch!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.IsBranch = newVal + return arg0 + }, + }, + // is-branch-open returns true if the branch with the given TreeNodeID is expanded. + // + // Args: + // * recv - Go(*widget.Tree) + // * uid - string + // Result: + // * bool + "Go(*widget.Tree)//is-branch-open": { + Doc: "(*widget.Tree).IsBranchOpen", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//is-branch-open: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//is-branch-open: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//is-branch-open: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.TreeNodeID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + arg1Val = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//is-branch-open: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.TreeNodeID(u) + } + } + res0 := arg0Val.IsBranchOpen(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Result: + // * fn { string } -> bool + "Go(*widget.Tree)//is-branch?": { + Doc: "Get *widget.Tree IsBranch value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//is-branch?: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//is-branch?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//is-branch?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.TreeNodeID + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + arg0Val = natVal + } else { + var u string + if vc, ok := arg0.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//is-branch?: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = widget.TreeNodeID(u) + } + } + res0 := self.IsBranch(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, 1, false, false, "Returned func") + return resObj + }, + }, + // min-size returns the size that this widget should not shrink below. + // + // Args: + // * recv - Go(*widget.Tree) + // Result: + // * Go(fyne.Size) + "Go(*widget.Tree)//min-size": { + Doc: "(*widget.Tree).MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//min-size: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Tree) + // * pos - Go(fyne.Position) + "Go(*widget.Tree)//move": { + Doc: "(*widget.Tree).Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//move: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * on-branch-closed - fn { string } + // Result: + // * fn { string } + "Go(*widget.Tree)//on-branch-closed!": { + Doc: "Set *widget.Tree OnBranchClosed value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-closed!: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-closed!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-closed!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.TreeNodeID) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-closed!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.TreeNodeID) { + var farg0Val env.Object + farg0Val = *env.NewString(string(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-closed!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-closed!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnBranchClosed = newVal + return arg0 + }, + }, + // Result: + // * fn { string } + "Go(*widget.Tree)//on-branch-closed?": { + Doc: "Get *widget.Tree OnBranchClosed value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-closed?: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-closed?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-closed?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.TreeNodeID + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + arg0Val = natVal + } else { + var u string + if vc, ok := arg0.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-closed?: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = widget.TreeNodeID(u) + } + } + self.OnBranchClosed(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-branch-opened - fn { string } + // Result: + // * fn { string } + "Go(*widget.Tree)//on-branch-opened!": { + Doc: "Set *widget.Tree OnBranchOpened value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-opened!: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-opened!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-opened!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.TreeNodeID) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-opened!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.TreeNodeID) { + var farg0Val env.Object + farg0Val = *env.NewString(string(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-opened!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-opened!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnBranchOpened = newVal + return arg0 + }, + }, + // Result: + // * fn { string } + "Go(*widget.Tree)//on-branch-opened?": { + Doc: "Get *widget.Tree OnBranchOpened value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-opened?: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-opened?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-opened?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.TreeNodeID + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + arg0Val = natVal + } else { + var u string + if vc, ok := arg0.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-branch-opened?: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = widget.TreeNodeID(u) + } + } + self.OnBranchOpened(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-selected - fn { string } + // Result: + // * fn { string } + "Go(*widget.Tree)//on-selected!": { + Doc: "Set *widget.Tree OnSelected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-selected!: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-selected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-selected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.TreeNodeID) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-selected!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.TreeNodeID) { + var farg0Val env.Object + farg0Val = *env.NewString(string(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-selected!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-selected!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnSelected = newVal + return arg0 + }, + }, + // Result: + // * fn { string } + "Go(*widget.Tree)//on-selected?": { + Doc: "Get *widget.Tree OnSelected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-selected?: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-selected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-selected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.TreeNodeID + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + arg0Val = natVal + } else { + var u string + if vc, ok := arg0.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-selected?: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = widget.TreeNodeID(u) + } + } + self.OnSelected(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * on-unselected - fn { string } + // Result: + // * fn { string } + "Go(*widget.Tree)//on-unselected!": { + Doc: "Set *widget.Tree OnUnselected value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-unselected!: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-unselected!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-unselected!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.TreeNodeID) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-unselected!: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.TreeNodeID) { + var farg0Val env.Object + farg0Val = *env.NewString(string(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-unselected!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-unselected!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.OnUnselected = newVal + return arg0 + }, + }, + // Result: + // * fn { string } + "Go(*widget.Tree)//on-unselected?": { + Doc: "Get *widget.Tree OnUnselected value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-unselected?: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-unselected?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-unselected?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.TreeNodeID + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + arg0Val = natVal + } else { + var u string + if vc, ok := arg0.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//on-unselected?: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = widget.TreeNodeID(u) + } + } + self.OnUnselected(arg0Val) + return nil + }, 1, false, false, "Returned func") + return resObj + }, + }, + // open-all-branches opens all branches in the tree. + // + // Args: + // * recv - Go(*widget.Tree) + "Go(*widget.Tree)//open-all-branches": { + Doc: "(*widget.Tree).OpenAllBranches", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//open-all-branches: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//open-all-branches: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//open-all-branches: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.OpenAllBranches() + return arg0 + }, + }, + // open-branch opens the branch with the given TreeNodeID. + // + // Args: + // * recv - Go(*widget.Tree) + // * uid - string + "Go(*widget.Tree)//open-branch": { + Doc: "(*widget.Tree).OpenBranch", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//open-branch: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//open-branch: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//open-branch: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.TreeNodeID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + arg1Val = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//open-branch: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.TreeNodeID(u) + } + } + arg0Val.OpenBranch(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Tree) + // Result: + // * Go(fyne.position) + "Go(*widget.Tree)//position": { + Doc: "(*widget.Tree).Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//position: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Tree) + "Go(*widget.Tree)//refresh": { + Doc: "(*widget.Tree).Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//refresh: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // refresh-item refreshes a single item, specified by the item ID passed in. + // + // Since: 2.4 + // + // Args: + // * recv - Go(*widget.Tree) + // * id - string + "Go(*widget.Tree)//refresh-item": { + Doc: "(*widget.Tree).RefreshItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//refresh-item: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//refresh-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//refresh-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.TreeNodeID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + arg1Val = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//refresh-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.TreeNodeID(u) + } + } + arg0Val.RefreshItem(arg1Val) + return arg0 + }, + }, + // resize sets a new size for a widget. + // + // Args: + // * recv - Go(*widget.Tree) + // * size - Go(fyne.Size) + "Go(*widget.Tree)//resize": { + Doc: "(*widget.Tree).Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//resize: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * root - string + // Result: + // * string + "Go(*widget.Tree)//root!": { + Doc: "Set *widget.Tree Root value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//root!: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//root!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//root!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal widget.TreeNodeID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + newVal = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//root!: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + newVal = widget.TreeNodeID(u) + } + } + self.Root = newVal + return arg0 + }, + }, + // Result: + // * string + "Go(*widget.Tree)//root?": { + Doc: "Get *widget.Tree Root value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//root?: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//root?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//root?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewString(string(self.Root)) + return resObj + }, + }, + // scroll-to scrolls to the node with the given id. + // + // Since 2.1 + // + // Args: + // * recv - Go(*widget.Tree) + // * uid - string + "Go(*widget.Tree)//scroll-to": { + Doc: "(*widget.Tree).ScrollTo", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//scroll-to: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//scroll-to: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//scroll-to: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.TreeNodeID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + arg1Val = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//scroll-to: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.TreeNodeID(u) + } + } + arg0Val.ScrollTo(arg1Val) + return arg0 + }, + }, + // scroll-to-bottom scrolls to the bottom of the tree. + // + // Since 2.1 + // + // Args: + // * recv - Go(*widget.Tree) + "Go(*widget.Tree)//scroll-to-bottom": { + Doc: "(*widget.Tree).ScrollToBottom", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//scroll-to-bottom: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//scroll-to-bottom: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//scroll-to-bottom: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ScrollToBottom() + return arg0 + }, + }, + // scroll-to-top scrolls to the top of the tree. + // + // Since 2.1 + // + // Args: + // * recv - Go(*widget.Tree) + "Go(*widget.Tree)//scroll-to-top": { + Doc: "(*widget.Tree).ScrollToTop", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//scroll-to-top: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//scroll-to-top: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//scroll-to-top: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ScrollToTop() + return arg0 + }, + }, + // select marks the specified node to be selected. + // + // Args: + // * recv - Go(*widget.Tree) + // * uid - string + "Go(*widget.Tree)//select": { + Doc: "(*widget.Tree).Select", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//select: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//select: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//select: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.TreeNodeID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + arg1Val = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//select: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.TreeNodeID(u) + } + } + arg0Val.Select(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Tree) + "Go(*widget.Tree)//show": { + Doc: "(*widget.Tree).Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//show: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(*widget.Tree) + // Result: + // * Go(fyne.size) + "Go(*widget.Tree)//size": { + Doc: "(*widget.Tree).Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//size: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(*widget.Tree) + // Result: + // * Go(fyne.theme) + "Go(*widget.Tree)//theme": { + Doc: "(*widget.Tree).Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//theme: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // toggle-branch flips the state of the branch with the given TreeNodeID. + // + // Args: + // * recv - Go(*widget.Tree) + // * uid - string + "Go(*widget.Tree)//toggle-branch": { + Doc: "(*widget.Tree).ToggleBranch", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//toggle-branch: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//toggle-branch: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//toggle-branch: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//toggle-branch: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.ToggleBranch(arg1Val) + return arg0 + }, + }, + // typed-key is called if a key event happens while this Tree is focused. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Tree) + // * event - Go(*fyne.KeyEvent) + "Go(*widget.Tree)//typed-key": { + Doc: "(*widget.Tree).TypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//typed-key: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//typed-key: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//typed-key: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedKey(arg1Val) + return arg0 + }, + }, + // typed-rune is called if a text event happens while this Tree is focused. + // + // Implements: fyne.Focusable + // + // Args: + // * recv - Go(*widget.Tree) + // * - - Go(rune) + "Go(*widget.Tree)//typed-rune": { + Doc: "(*widget.Tree).TypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//typed-rune: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//typed-rune: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//typed-rune: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedRune(arg1Val) + return arg0 + }, + }, + // unselect marks the specified node to be not selected. + // + // Args: + // * recv - Go(*widget.Tree) + // * uid - string + "Go(*widget.Tree)//unselect": { + Doc: "(*widget.Tree).Unselect", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//unselect: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//unselect: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//unselect: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val widget.TreeNodeID + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + arg1Val = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//unselect: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = widget.TreeNodeID(u) + } + } + arg0Val.Unselect(arg1Val) + return arg0 + }, + }, + // unselect-all sets all nodes to be not selected. + // + // Since: 2.1 + // + // Args: + // * recv - Go(*widget.Tree) + "Go(*widget.Tree)//unselect-all": { + Doc: "(*widget.Tree).UnselectAll", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//unselect-all: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//unselect-all: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//unselect-all: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.UnselectAll() + return arg0 + }, + }, + // Args: + // * update-node - fn { string bool Go(fyne.CanvasObject) } + // Result: + // * fn { string bool Go(fyne.CanvasObject) } + "Go(*widget.Tree)//update-node!": { + Doc: "Set *widget.Tree UpdateNode value", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//update-node!: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//update-node!: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//update-node!: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var newVal func(widget.TreeNodeID, bool, fyne.CanvasObject) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 3 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//update-node!: arg 2: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + newVal = func(farg0 widget.TreeNodeID, farg1 bool, farg2 fyne.CanvasObject) { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(string(farg0)) + farg1Val = *env.NewInteger(boolToInt64(farg1)) + farg2Val = ifaceToNative(ps.Idx, farg2, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//update-node!: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + newVal = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//update-node!: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + self.UpdateNode = newVal + return arg0 + }, + }, + // Result: + // * fn { string bool Go(fyne.CanvasObject) } + "Go(*widget.Tree)//update-node?": { + Doc: "Get *widget.Tree UpdateNode value", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var self *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + self = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//update-node?: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//update-node?: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + self = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//update-node?: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var resObj env.Object + resObj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.TreeNodeID + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + arg0Val = natVal + } else { + var u string + if vc, ok := arg0.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//update-node?: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = widget.TreeNodeID(u) + } + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//update-node?: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.CanvasObject + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//update-node?: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//update-node?: arg 3: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//update-node?: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//update-node?: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + self.UpdateNode(arg0Val, arg1Val, arg2Val) + return nil + }, 3, false, false, "Returned func") + return resObj + }, + }, + // Args: + // * recv - Go(*widget.Tree) + // Result: + // * bool + "Go(*widget.Tree)//visible": { + Doc: "(*widget.Tree).Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *widget.Tree + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.Tree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//visible: arg 1: " + "expected native of type *widget.Tree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(*widget.Tree)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.Bool) + // * 1 - Go(binding.DataListener) + "Go(binding.Bool)//add-listener": { + Doc: "binding.Bool.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Bool + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Bool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Bool); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//add-listener: arg 1: " + "expected native of type binding.Bool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Bool) + // Result: + // * bool + // * error + "Go(binding.Bool)//get": { + Doc: "binding.Bool.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Bool + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Bool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Bool); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//get: arg 1: " + "expected native of type binding.Bool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.Bool) + // * 1 - Go(binding.DataListener) + "Go(binding.Bool)//remove-listener": { + Doc: "binding.Bool.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Bool + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Bool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Bool); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//remove-listener: arg 1: " + "expected native of type binding.Bool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Bool) + // * 1 - bool + // Result: + // * error + "Go(binding.Bool)//set": { + Doc: "binding.Bool.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Bool + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Bool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Bool); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//set: arg 1: " + "expected native of type binding.Bool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Bool)//set: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BoolList) + // * 1 - Go(binding.DataListener) + "Go(binding.BoolList)//add-listener": { + Doc: "binding.BoolList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//add-listener: arg 1: " + "expected native of type binding.BoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BoolList) + // * value - bool + // Result: + // * error + "Go(binding.BoolList)//append": { + Doc: "binding.BoolList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//append: arg 1: " + "expected native of type binding.BoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//append: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BoolList) + // Result: + // * block[bool] + // * error + "Go(binding.BoolList)//get": { + Doc: "binding.BoolList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//get: arg 1: " + "expected native of type binding.BoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(boolToInt64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.BoolList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.BoolList)//get-item": { + Doc: "binding.BoolList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//get-item: arg 1: " + "expected native of type binding.BoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.BoolList) + // * index - integer + // Result: + // * bool + // * error + "Go(binding.BoolList)//get-value": { + Doc: "binding.BoolList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//get-value: arg 1: " + "expected native of type binding.BoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.BoolList) + // Result: + // * integer + "Go(binding.BoolList)//length": { + Doc: "binding.BoolList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//length: arg 1: " + "expected native of type binding.BoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.BoolList) + // * value - bool + // Result: + // * error + "Go(binding.BoolList)//prepend": { + Doc: "binding.BoolList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//prepend: arg 1: " + "expected native of type binding.BoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//prepend: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BoolList) + // * value - bool + // Result: + // * error + "Go(binding.BoolList)//remove": { + Doc: "binding.BoolList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//remove: arg 1: " + "expected native of type binding.BoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//remove: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BoolList) + // * 1 - Go(binding.DataListener) + "Go(binding.BoolList)//remove-listener": { + Doc: "binding.BoolList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//remove-listener: arg 1: " + "expected native of type binding.BoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BoolList) + // * list - block[bool] + // Result: + // * error + "Go(binding.BoolList)//set": { + Doc: "binding.BoolList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//set: arg 1: " + "expected native of type binding.BoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []bool + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]bool, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//set: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BoolList) + // * index - integer + // * value - bool + // Result: + // * error + "Go(binding.BoolList)//set-value": { + Doc: "binding.BoolList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//set-value: arg 1: " + "expected native of type binding.BoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val bool + if vc, ok := arg2.(env.Integer); ok { + arg2Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolList)//set-value: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BoolTree) + // * 1 - Go(binding.DataListener) + "Go(binding.BoolTree)//add-listener": { + Doc: "binding.BoolTree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//add-listener: arg 1: " + "expected native of type binding.BoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BoolTree) + // * parent - string + // * id - string + // * value - bool + // Result: + // * error + "Go(binding.BoolTree)//append": { + Doc: "binding.BoolTree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//append: arg 1: " + "expected native of type binding.BoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val bool + if vc, ok := arg3.(env.Integer); ok { + arg3Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//append: arg 4: " + "expected integer, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BoolTree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.BoolTree)//child-i-ds": { + Doc: "binding.BoolTree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//child-i-ds: arg 1: " + "expected native of type binding.BoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.BoolTree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, bool] + // ] + // * error + "Go(binding.BoolTree)//get": { + Doc: "binding.BoolTree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//get: arg 1: " + "expected native of type binding.BoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + dVal = *env.NewInteger(boolToInt64(mVal)) + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.BoolTree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.BoolTree)//get-item": { + Doc: "binding.BoolTree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//get-item: arg 1: " + "expected native of type binding.BoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.BoolTree) + // * id - string + // Result: + // * bool + // * error + "Go(binding.BoolTree)//get-value": { + Doc: "binding.BoolTree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//get-value: arg 1: " + "expected native of type binding.BoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.BoolTree) + // * parent - string + // * id - string + // * value - bool + // Result: + // * error + "Go(binding.BoolTree)//prepend": { + Doc: "binding.BoolTree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//prepend: arg 1: " + "expected native of type binding.BoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val bool + if vc, ok := arg3.(env.Integer); ok { + arg3Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//prepend: arg 4: " + "expected integer, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BoolTree) + // * id - string + // Result: + // * error + "Go(binding.BoolTree)//remove": { + Doc: "binding.BoolTree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//remove: arg 1: " + "expected native of type binding.BoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BoolTree) + // * 1 - Go(binding.DataListener) + "Go(binding.BoolTree)//remove-listener": { + Doc: "binding.BoolTree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//remove-listener: arg 1: " + "expected native of type binding.BoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BoolTree) + // * ids - dict[string, block[string]] + // * values - dict[string, bool] + // Result: + // * error + "Go(binding.BoolTree)//set": { + Doc: "binding.BoolTree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 1: " + "expected native of type binding.BoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string]bool + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string]bool, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV bool + if vc, ok := v.Series.S[i+1].(env.Integer); ok { + mapV = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 3: " + "map value: " + "expected integer, but got " + objectDebugString(ps.Idx, v.Series.S[i+1])) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string]bool, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV bool + if vc, ok := dictV.(env.Integer); ok { + mapV = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 3: " + "map value: " + "expected integer, but got " + objectDebugString(ps.Idx, dictV)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BoolTree) + // * id - string + // * value - bool + // Result: + // * error + "Go(binding.BoolTree)//set-value": { + Doc: "binding.BoolTree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set-value: arg 1: " + "expected native of type binding.BoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val bool + if vc, ok := arg2.(env.Integer); ok { + arg2Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BoolTree)//set-value: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Bytes) + // * 1 - Go(binding.DataListener) + "Go(binding.Bytes)//add-listener": { + Doc: "binding.Bytes.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Bytes + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Bytes(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Bytes); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//add-listener: arg 1: " + "expected native of type binding.Bytes, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Bytes) + // Result: + // * block[integer] + // * error + "Go(binding.Bytes)//get": { + Doc: "binding.Bytes.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Bytes + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Bytes(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Bytes); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//get: arg 1: " + "expected native of type binding.Bytes, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.Bytes) + // * 1 - Go(binding.DataListener) + "Go(binding.Bytes)//remove-listener": { + Doc: "binding.Bytes.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Bytes + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Bytes(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Bytes); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//remove-listener: arg 1: " + "expected native of type binding.Bytes, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Bytes) + // * 1 - block[integer] + // Result: + // * error + "Go(binding.Bytes)//set": { + Doc: "binding.Bytes.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Bytes + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Bytes(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Bytes); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//set: arg 1: " + "expected native of type binding.Bytes, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []byte + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//set: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Bytes)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BytesList) + // * 1 - Go(binding.DataListener) + "Go(binding.BytesList)//add-listener": { + Doc: "binding.BytesList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//add-listener: arg 1: " + "expected native of type binding.BytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BytesList) + // * value - block[integer] + // Result: + // * error + "Go(binding.BytesList)//append": { + Doc: "binding.BytesList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//append: arg 1: " + "expected native of type binding.BytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []byte + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//append: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//append: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//append: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BytesList) + // Result: + // * block[block[integer]] + // * error + "Go(binding.BytesList)//get": { + Doc: "binding.BytesList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//get: arg 1: " + "expected native of type binding.BytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + { + items := make([]env.Object, len(it)) + for i, it := range it { + items[i] = *env.NewInteger(int64(it)) + } + items[i] = *env.NewBlock(*env.NewTSeries(items)) + } + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.BytesList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.BytesList)//get-item": { + Doc: "binding.BytesList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//get-item: arg 1: " + "expected native of type binding.BytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.BytesList) + // * index - integer + // Result: + // * block[integer] + // * error + "Go(binding.BytesList)//get-value": { + Doc: "binding.BytesList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//get-value: arg 1: " + "expected native of type binding.BytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.BytesList) + // Result: + // * integer + "Go(binding.BytesList)//length": { + Doc: "binding.BytesList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//length: arg 1: " + "expected native of type binding.BytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.BytesList) + // * value - block[integer] + // Result: + // * error + "Go(binding.BytesList)//prepend": { + Doc: "binding.BytesList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//prepend: arg 1: " + "expected native of type binding.BytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []byte + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//prepend: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//prepend: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//prepend: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BytesList) + // * value - block[integer] + // Result: + // * error + "Go(binding.BytesList)//remove": { + Doc: "binding.BytesList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//remove: arg 1: " + "expected native of type binding.BytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []byte + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//remove: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//remove: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//remove: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BytesList) + // * 1 - Go(binding.DataListener) + "Go(binding.BytesList)//remove-listener": { + Doc: "binding.BytesList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//remove-listener: arg 1: " + "expected native of type binding.BytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BytesList) + // * list - block[block[integer]] + // Result: + // * error + "Go(binding.BytesList)//set": { + Doc: "binding.BytesList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set: arg 1: " + "expected native of type binding.BytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val [][]byte + switch v := arg1.(type) { + case env.Block: + arg1Val = make([][]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.Block: + (*iv) = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &(*iv)[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set: arg 2: " + "block item: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set: arg 2: " + "block item: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BytesList) + // * index - integer + // * value - block[integer] + // Result: + // * error + "Go(binding.BytesList)//set-value": { + Doc: "binding.BytesList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set-value: arg 1: " + "expected native of type binding.BytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val []byte + switch v := arg2.(type) { + case env.Block: + arg2Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg2Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set-value: arg 3: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set-value: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesList)//set-value: arg 3: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BytesTree) + // * 1 - Go(binding.DataListener) + "Go(binding.BytesTree)//add-listener": { + Doc: "binding.BytesTree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//add-listener: arg 1: " + "expected native of type binding.BytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BytesTree) + // * parent - string + // * id - string + // * value - block[integer] + // Result: + // * error + "Go(binding.BytesTree)//append": { + Doc: "binding.BytesTree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//append: arg 1: " + "expected native of type binding.BytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val []byte + switch v := arg3.(type) { + case env.Block: + arg3Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg3Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//append: arg 4: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//append: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//append: arg 4: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BytesTree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.BytesTree)//child-i-ds": { + Doc: "binding.BytesTree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//child-i-ds: arg 1: " + "expected native of type binding.BytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.BytesTree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, block[integer]] + // ] + // * error + "Go(binding.BytesTree)//get": { + Doc: "binding.BytesTree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//get: arg 1: " + "expected native of type binding.BytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewInteger(int64(it)) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.BytesTree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.BytesTree)//get-item": { + Doc: "binding.BytesTree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//get-item: arg 1: " + "expected native of type binding.BytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.BytesTree) + // * id - string + // Result: + // * block[integer] + // * error + "Go(binding.BytesTree)//get-value": { + Doc: "binding.BytesTree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//get-value: arg 1: " + "expected native of type binding.BytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.BytesTree) + // * parent - string + // * id - string + // * value - block[integer] + // Result: + // * error + "Go(binding.BytesTree)//prepend": { + Doc: "binding.BytesTree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//prepend: arg 1: " + "expected native of type binding.BytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val []byte + switch v := arg3.(type) { + case env.Block: + arg3Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg3Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//prepend: arg 4: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//prepend: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//prepend: arg 4: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BytesTree) + // * id - string + // Result: + // * error + "Go(binding.BytesTree)//remove": { + Doc: "binding.BytesTree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//remove: arg 1: " + "expected native of type binding.BytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BytesTree) + // * 1 - Go(binding.DataListener) + "Go(binding.BytesTree)//remove-listener": { + Doc: "binding.BytesTree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//remove-listener: arg 1: " + "expected native of type binding.BytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BytesTree) + // * ids - dict[string, block[string]] + // * values - dict[string, block[integer]] + // Result: + // * error + "Go(binding.BytesTree)//set": { + Doc: "binding.BytesTree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 1: " + "expected native of type binding.BytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string][]byte + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string][]byte, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []byte + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 3: " + "map value: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 3: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 3: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string][]byte, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []byte + switch v := dictV.(type) { + case env.Block: + mapV = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 3: " + "map value: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 3: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 3: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.BytesTree) + // * id - string + // * value - block[integer] + // Result: + // * error + "Go(binding.BytesTree)//set-value": { + Doc: "binding.BytesTree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.BytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_BytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.BytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set-value: arg 1: " + "expected native of type binding.BytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val []byte + switch v := arg2.(type) { + case env.Block: + arg2Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg2Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set-value: arg 3: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set-value: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.BytesTree)//set-value: arg 3: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.DataItem) + // * 1 - Go(binding.DataListener) + "Go(binding.DataItem)//add-listener": { + Doc: "binding.DataItem.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataItem + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//add-listener: arg 1: " + "expected native of type binding.DataItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.DataItem) + // * 1 - Go(binding.DataListener) + "Go(binding.DataItem)//remove-listener": { + Doc: "binding.DataItem.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataItem + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//remove-listener: arg 1: " + "expected native of type binding.DataItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataItem)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.DataList) + // * 1 - Go(binding.DataListener) + "Go(binding.DataList)//add-listener": { + Doc: "binding.DataList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//add-listener: arg 1: " + "expected native of type binding.DataList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.DataList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.DataList)//get-item": { + Doc: "binding.DataList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//get-item: arg 1: " + "expected native of type binding.DataList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.DataList) + // Result: + // * integer + "Go(binding.DataList)//length": { + Doc: "binding.DataList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//length: arg 1: " + "expected native of type binding.DataList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.DataList) + // * 1 - Go(binding.DataListener) + "Go(binding.DataList)//remove-listener": { + Doc: "binding.DataList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//remove-listener: arg 1: " + "expected native of type binding.DataList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.DataListener) + "Go(binding.DataListener)//data-changed": { + Doc: "binding.DataListener.DataChanged", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataListener + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataListener)//data-changed: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataListener)//data-changed: arg 1: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataListener)//data-changed: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataListener)//data-changed: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.DataChanged() + return arg0 + }, + }, + // Args: + // * recv - Go(binding.DataMap) + // * 1 - Go(binding.DataListener) + "Go(binding.DataMap)//add-listener": { + Doc: "binding.DataMap.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//add-listener: arg 1: " + "expected native of type binding.DataMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.DataMap) + // * 1 - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.DataMap)//get-item": { + Doc: "binding.DataMap.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//get-item: arg 1: " + "expected native of type binding.DataMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.DataMap) + // Result: + // * block[string] + "Go(binding.DataMap)//keys": { + Doc: "binding.DataMap.Keys", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//keys: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//keys: arg 1: " + "expected native of type binding.DataMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//keys: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//keys: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Keys() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.DataMap) + // * 1 - Go(binding.DataListener) + "Go(binding.DataMap)//remove-listener": { + Doc: "binding.DataMap.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//remove-listener: arg 1: " + "expected native of type binding.DataMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataMap)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.DataTree) + // * 1 - Go(binding.DataListener) + "Go(binding.DataTree)//add-listener": { + Doc: "binding.DataTree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//add-listener: arg 1: " + "expected native of type binding.DataTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.DataTree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.DataTree)//child-i-ds": { + Doc: "binding.DataTree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//child-i-ds: arg 1: " + "expected native of type binding.DataTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.DataTree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.DataTree)//get-item": { + Doc: "binding.DataTree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//get-item: arg 1: " + "expected native of type binding.DataTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.DataTree) + // * 1 - Go(binding.DataListener) + "Go(binding.DataTree)//remove-listener": { + Doc: "binding.DataTree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//remove-listener: arg 1: " + "expected native of type binding.DataTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.DataTree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBool) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalBool)//add-listener": { + Doc: "binding.ExternalBool.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBool + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBool); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//add-listener: arg 1: " + "expected native of type binding.ExternalBool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBool) + // Result: + // * bool + // * error + "Go(binding.ExternalBool)//get": { + Doc: "binding.ExternalBool.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBool + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBool); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//get: arg 1: " + "expected native of type binding.ExternalBool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBool) + // Result: + // * error + "Go(binding.ExternalBool)//reload": { + Doc: "binding.ExternalBool.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBool + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBool); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//reload: arg 1: " + "expected native of type binding.ExternalBool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBool) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalBool)//remove-listener": { + Doc: "binding.ExternalBool.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBool + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBool); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//remove-listener: arg 1: " + "expected native of type binding.ExternalBool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBool) + // * 1 - bool + // Result: + // * error + "Go(binding.ExternalBool)//set": { + Doc: "binding.ExternalBool.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBool + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBool); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//set: arg 1: " + "expected native of type binding.ExternalBool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBool)//set: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalBoolList)//add-listener": { + Doc: "binding.ExternalBoolList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//add-listener: arg 1: " + "expected native of type binding.ExternalBoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolList) + // * value - bool + // Result: + // * error + "Go(binding.ExternalBoolList)//append": { + Doc: "binding.ExternalBoolList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//append: arg 1: " + "expected native of type binding.ExternalBoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//append: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolList) + // Result: + // * block[bool] + // * error + "Go(binding.ExternalBoolList)//get": { + Doc: "binding.ExternalBoolList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//get: arg 1: " + "expected native of type binding.ExternalBoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(boolToInt64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalBoolList)//get-item": { + Doc: "binding.ExternalBoolList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//get-item: arg 1: " + "expected native of type binding.ExternalBoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolList) + // * index - integer + // Result: + // * bool + // * error + "Go(binding.ExternalBoolList)//get-value": { + Doc: "binding.ExternalBoolList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//get-value: arg 1: " + "expected native of type binding.ExternalBoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolList) + // Result: + // * integer + "Go(binding.ExternalBoolList)//length": { + Doc: "binding.ExternalBoolList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//length: arg 1: " + "expected native of type binding.ExternalBoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolList) + // * value - bool + // Result: + // * error + "Go(binding.ExternalBoolList)//prepend": { + Doc: "binding.ExternalBoolList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//prepend: arg 1: " + "expected native of type binding.ExternalBoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//prepend: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolList) + // Result: + // * error + "Go(binding.ExternalBoolList)//reload": { + Doc: "binding.ExternalBoolList.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//reload: arg 1: " + "expected native of type binding.ExternalBoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolList) + // * value - bool + // Result: + // * error + "Go(binding.ExternalBoolList)//remove": { + Doc: "binding.ExternalBoolList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//remove: arg 1: " + "expected native of type binding.ExternalBoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//remove: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalBoolList)//remove-listener": { + Doc: "binding.ExternalBoolList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//remove-listener: arg 1: " + "expected native of type binding.ExternalBoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolList) + // * list - block[bool] + // Result: + // * error + "Go(binding.ExternalBoolList)//set": { + Doc: "binding.ExternalBoolList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//set: arg 1: " + "expected native of type binding.ExternalBoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []bool + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]bool, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//set: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolList) + // * index - integer + // * value - bool + // Result: + // * error + "Go(binding.ExternalBoolList)//set-value": { + Doc: "binding.ExternalBoolList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//set-value: arg 1: " + "expected native of type binding.ExternalBoolList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val bool + if vc, ok := arg2.(env.Integer); ok { + arg2Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolList)//set-value: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolTree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalBoolTree)//add-listener": { + Doc: "binding.ExternalBoolTree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//add-listener: arg 1: " + "expected native of type binding.ExternalBoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolTree) + // * parent - string + // * id - string + // * value - bool + // Result: + // * error + "Go(binding.ExternalBoolTree)//append": { + Doc: "binding.ExternalBoolTree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//append: arg 1: " + "expected native of type binding.ExternalBoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val bool + if vc, ok := arg3.(env.Integer); ok { + arg3Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//append: arg 4: " + "expected integer, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolTree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.ExternalBoolTree)//child-i-ds": { + Doc: "binding.ExternalBoolTree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//child-i-ds: arg 1: " + "expected native of type binding.ExternalBoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolTree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, bool] + // ] + // * error + "Go(binding.ExternalBoolTree)//get": { + Doc: "binding.ExternalBoolTree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//get: arg 1: " + "expected native of type binding.ExternalBoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + dVal = *env.NewInteger(boolToInt64(mVal)) + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolTree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalBoolTree)//get-item": { + Doc: "binding.ExternalBoolTree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//get-item: arg 1: " + "expected native of type binding.ExternalBoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolTree) + // * id - string + // Result: + // * bool + // * error + "Go(binding.ExternalBoolTree)//get-value": { + Doc: "binding.ExternalBoolTree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//get-value: arg 1: " + "expected native of type binding.ExternalBoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolTree) + // * parent - string + // * id - string + // * value - bool + // Result: + // * error + "Go(binding.ExternalBoolTree)//prepend": { + Doc: "binding.ExternalBoolTree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//prepend: arg 1: " + "expected native of type binding.ExternalBoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val bool + if vc, ok := arg3.(env.Integer); ok { + arg3Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//prepend: arg 4: " + "expected integer, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolTree) + // Result: + // * error + "Go(binding.ExternalBoolTree)//reload": { + Doc: "binding.ExternalBoolTree.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//reload: arg 1: " + "expected native of type binding.ExternalBoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolTree) + // * id - string + // Result: + // * error + "Go(binding.ExternalBoolTree)//remove": { + Doc: "binding.ExternalBoolTree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//remove: arg 1: " + "expected native of type binding.ExternalBoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolTree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalBoolTree)//remove-listener": { + Doc: "binding.ExternalBoolTree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//remove-listener: arg 1: " + "expected native of type binding.ExternalBoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolTree) + // * ids - dict[string, block[string]] + // * values - dict[string, bool] + // Result: + // * error + "Go(binding.ExternalBoolTree)//set": { + Doc: "binding.ExternalBoolTree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 1: " + "expected native of type binding.ExternalBoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string]bool + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string]bool, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV bool + if vc, ok := v.Series.S[i+1].(env.Integer); ok { + mapV = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 3: " + "map value: " + "expected integer, but got " + objectDebugString(ps.Idx, v.Series.S[i+1])) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string]bool, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV bool + if vc, ok := dictV.(env.Integer); ok { + mapV = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 3: " + "map value: " + "expected integer, but got " + objectDebugString(ps.Idx, dictV)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBoolTree) + // * id - string + // * value - bool + // Result: + // * error + "Go(binding.ExternalBoolTree)//set-value": { + Doc: "binding.ExternalBoolTree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBoolTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBoolTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBoolTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set-value: arg 1: " + "expected native of type binding.ExternalBoolTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val bool + if vc, ok := arg2.(env.Integer); ok { + arg2Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBoolTree)//set-value: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytes) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalBytes)//add-listener": { + Doc: "binding.ExternalBytes.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytes + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytes(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytes); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//add-listener: arg 1: " + "expected native of type binding.ExternalBytes, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytes) + // Result: + // * block[integer] + // * error + "Go(binding.ExternalBytes)//get": { + Doc: "binding.ExternalBytes.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytes + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytes(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytes); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//get: arg 1: " + "expected native of type binding.ExternalBytes, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBytes) + // Result: + // * error + "Go(binding.ExternalBytes)//reload": { + Doc: "binding.ExternalBytes.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytes + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytes(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytes); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//reload: arg 1: " + "expected native of type binding.ExternalBytes, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytes) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalBytes)//remove-listener": { + Doc: "binding.ExternalBytes.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytes + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytes(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytes); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//remove-listener: arg 1: " + "expected native of type binding.ExternalBytes, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytes) + // * 1 - block[integer] + // Result: + // * error + "Go(binding.ExternalBytes)//set": { + Doc: "binding.ExternalBytes.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytes + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytes(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytes); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//set: arg 1: " + "expected native of type binding.ExternalBytes, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []byte + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//set: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytes)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalBytesList)//add-listener": { + Doc: "binding.ExternalBytesList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//add-listener: arg 1: " + "expected native of type binding.ExternalBytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesList) + // * value - block[integer] + // Result: + // * error + "Go(binding.ExternalBytesList)//append": { + Doc: "binding.ExternalBytesList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//append: arg 1: " + "expected native of type binding.ExternalBytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []byte + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//append: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//append: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//append: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesList) + // Result: + // * block[block[integer]] + // * error + "Go(binding.ExternalBytesList)//get": { + Doc: "binding.ExternalBytesList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//get: arg 1: " + "expected native of type binding.ExternalBytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + { + items := make([]env.Object, len(it)) + for i, it := range it { + items[i] = *env.NewInteger(int64(it)) + } + items[i] = *env.NewBlock(*env.NewTSeries(items)) + } + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalBytesList)//get-item": { + Doc: "binding.ExternalBytesList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//get-item: arg 1: " + "expected native of type binding.ExternalBytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesList) + // * index - integer + // Result: + // * block[integer] + // * error + "Go(binding.ExternalBytesList)//get-value": { + Doc: "binding.ExternalBytesList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//get-value: arg 1: " + "expected native of type binding.ExternalBytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesList) + // Result: + // * integer + "Go(binding.ExternalBytesList)//length": { + Doc: "binding.ExternalBytesList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//length: arg 1: " + "expected native of type binding.ExternalBytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesList) + // * value - block[integer] + // Result: + // * error + "Go(binding.ExternalBytesList)//prepend": { + Doc: "binding.ExternalBytesList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//prepend: arg 1: " + "expected native of type binding.ExternalBytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []byte + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//prepend: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//prepend: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//prepend: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesList) + // Result: + // * error + "Go(binding.ExternalBytesList)//reload": { + Doc: "binding.ExternalBytesList.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//reload: arg 1: " + "expected native of type binding.ExternalBytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesList) + // * value - block[integer] + // Result: + // * error + "Go(binding.ExternalBytesList)//remove": { + Doc: "binding.ExternalBytesList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//remove: arg 1: " + "expected native of type binding.ExternalBytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []byte + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//remove: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//remove: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//remove: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalBytesList)//remove-listener": { + Doc: "binding.ExternalBytesList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//remove-listener: arg 1: " + "expected native of type binding.ExternalBytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesList) + // * list - block[block[integer]] + // Result: + // * error + "Go(binding.ExternalBytesList)//set": { + Doc: "binding.ExternalBytesList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set: arg 1: " + "expected native of type binding.ExternalBytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val [][]byte + switch v := arg1.(type) { + case env.Block: + arg1Val = make([][]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.Block: + (*iv) = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &(*iv)[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set: arg 2: " + "block item: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set: arg 2: " + "block item: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesList) + // * index - integer + // * value - block[integer] + // Result: + // * error + "Go(binding.ExternalBytesList)//set-value": { + Doc: "binding.ExternalBytesList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set-value: arg 1: " + "expected native of type binding.ExternalBytesList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val []byte + switch v := arg2.(type) { + case env.Block: + arg2Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg2Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set-value: arg 3: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set-value: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesList)//set-value: arg 3: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesTree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalBytesTree)//add-listener": { + Doc: "binding.ExternalBytesTree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//add-listener: arg 1: " + "expected native of type binding.ExternalBytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesTree) + // * parent - string + // * id - string + // * value - block[integer] + // Result: + // * error + "Go(binding.ExternalBytesTree)//append": { + Doc: "binding.ExternalBytesTree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//append: arg 1: " + "expected native of type binding.ExternalBytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val []byte + switch v := arg3.(type) { + case env.Block: + arg3Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg3Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//append: arg 4: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//append: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//append: arg 4: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesTree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.ExternalBytesTree)//child-i-ds": { + Doc: "binding.ExternalBytesTree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//child-i-ds: arg 1: " + "expected native of type binding.ExternalBytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesTree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, block[integer]] + // ] + // * error + "Go(binding.ExternalBytesTree)//get": { + Doc: "binding.ExternalBytesTree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//get: arg 1: " + "expected native of type binding.ExternalBytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewInteger(int64(it)) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesTree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalBytesTree)//get-item": { + Doc: "binding.ExternalBytesTree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//get-item: arg 1: " + "expected native of type binding.ExternalBytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesTree) + // * id - string + // Result: + // * block[integer] + // * error + "Go(binding.ExternalBytesTree)//get-value": { + Doc: "binding.ExternalBytesTree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//get-value: arg 1: " + "expected native of type binding.ExternalBytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesTree) + // * parent - string + // * id - string + // * value - block[integer] + // Result: + // * error + "Go(binding.ExternalBytesTree)//prepend": { + Doc: "binding.ExternalBytesTree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//prepend: arg 1: " + "expected native of type binding.ExternalBytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val []byte + switch v := arg3.(type) { + case env.Block: + arg3Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg3Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//prepend: arg 4: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//prepend: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//prepend: arg 4: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesTree) + // Result: + // * error + "Go(binding.ExternalBytesTree)//reload": { + Doc: "binding.ExternalBytesTree.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//reload: arg 1: " + "expected native of type binding.ExternalBytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesTree) + // * id - string + // Result: + // * error + "Go(binding.ExternalBytesTree)//remove": { + Doc: "binding.ExternalBytesTree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//remove: arg 1: " + "expected native of type binding.ExternalBytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesTree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalBytesTree)//remove-listener": { + Doc: "binding.ExternalBytesTree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//remove-listener: arg 1: " + "expected native of type binding.ExternalBytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesTree) + // * ids - dict[string, block[string]] + // * values - dict[string, block[integer]] + // Result: + // * error + "Go(binding.ExternalBytesTree)//set": { + Doc: "binding.ExternalBytesTree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 1: " + "expected native of type binding.ExternalBytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string][]byte + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string][]byte, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []byte + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 3: " + "map value: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 3: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 3: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string][]byte, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []byte + switch v := dictV.(type) { + case env.Block: + mapV = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 3: " + "map value: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 3: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 3: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalBytesTree) + // * id - string + // * value - block[integer] + // Result: + // * error + "Go(binding.ExternalBytesTree)//set-value": { + Doc: "binding.ExternalBytesTree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalBytesTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalBytesTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalBytesTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set-value: arg 1: " + "expected native of type binding.ExternalBytesTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val []byte + switch v := arg2.(type) { + case env.Block: + arg2Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg2Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set-value: arg 3: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set-value: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalBytesTree)//set-value: arg 3: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloat) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalFloat)//add-listener": { + Doc: "binding.ExternalFloat.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloat + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloat(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloat); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//add-listener: arg 1: " + "expected native of type binding.ExternalFloat, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloat) + // Result: + // * decimal + // * error + "Go(binding.ExternalFloat)//get": { + Doc: "binding.ExternalFloat.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloat + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloat(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloat); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//get: arg 1: " + "expected native of type binding.ExternalFloat, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalFloat) + // Result: + // * error + "Go(binding.ExternalFloat)//reload": { + Doc: "binding.ExternalFloat.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloat + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloat(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloat); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//reload: arg 1: " + "expected native of type binding.ExternalFloat, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloat) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalFloat)//remove-listener": { + Doc: "binding.ExternalFloat.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloat + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloat(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloat); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//remove-listener: arg 1: " + "expected native of type binding.ExternalFloat, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloat) + // * 1 - decimal + // Result: + // * error + "Go(binding.ExternalFloat)//set": { + Doc: "binding.ExternalFloat.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloat + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloat(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloat); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//set: arg 1: " + "expected native of type binding.ExternalFloat, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float64 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloat)//set: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalFloatList)//add-listener": { + Doc: "binding.ExternalFloatList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//add-listener: arg 1: " + "expected native of type binding.ExternalFloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatList) + // * value - decimal + // Result: + // * error + "Go(binding.ExternalFloatList)//append": { + Doc: "binding.ExternalFloatList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//append: arg 1: " + "expected native of type binding.ExternalFloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float64 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//append: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatList) + // Result: + // * block[decimal] + // * error + "Go(binding.ExternalFloatList)//get": { + Doc: "binding.ExternalFloatList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//get: arg 1: " + "expected native of type binding.ExternalFloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewDecimal(float64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalFloatList)//get-item": { + Doc: "binding.ExternalFloatList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//get-item: arg 1: " + "expected native of type binding.ExternalFloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatList) + // * index - integer + // Result: + // * decimal + // * error + "Go(binding.ExternalFloatList)//get-value": { + Doc: "binding.ExternalFloatList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//get-value: arg 1: " + "expected native of type binding.ExternalFloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatList) + // Result: + // * integer + "Go(binding.ExternalFloatList)//length": { + Doc: "binding.ExternalFloatList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//length: arg 1: " + "expected native of type binding.ExternalFloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatList) + // * value - decimal + // Result: + // * error + "Go(binding.ExternalFloatList)//prepend": { + Doc: "binding.ExternalFloatList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//prepend: arg 1: " + "expected native of type binding.ExternalFloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float64 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//prepend: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatList) + // Result: + // * error + "Go(binding.ExternalFloatList)//reload": { + Doc: "binding.ExternalFloatList.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//reload: arg 1: " + "expected native of type binding.ExternalFloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatList) + // * value - decimal + // Result: + // * error + "Go(binding.ExternalFloatList)//remove": { + Doc: "binding.ExternalFloatList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//remove: arg 1: " + "expected native of type binding.ExternalFloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float64 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//remove: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalFloatList)//remove-listener": { + Doc: "binding.ExternalFloatList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//remove-listener: arg 1: " + "expected native of type binding.ExternalFloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatList) + // * list - block[decimal] + // Result: + // * error + "Go(binding.ExternalFloatList)//set": { + Doc: "binding.ExternalFloatList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//set: arg 1: " + "expected native of type binding.ExternalFloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []float64 + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]float64, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Decimal); ok { + (*iv) = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//set: arg 2: " + "block item: " + "expected decimal, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatList) + // * index - integer + // * value - decimal + // Result: + // * error + "Go(binding.ExternalFloatList)//set-value": { + Doc: "binding.ExternalFloatList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//set-value: arg 1: " + "expected native of type binding.ExternalFloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val float64 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatList)//set-value: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatTree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalFloatTree)//add-listener": { + Doc: "binding.ExternalFloatTree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//add-listener: arg 1: " + "expected native of type binding.ExternalFloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatTree) + // * parent - string + // * id - string + // * value - decimal + // Result: + // * error + "Go(binding.ExternalFloatTree)//append": { + Doc: "binding.ExternalFloatTree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//append: arg 1: " + "expected native of type binding.ExternalFloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val float64 + if vc, ok := arg3.(env.Decimal); ok { + arg3Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//append: arg 4: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatTree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.ExternalFloatTree)//child-i-ds": { + Doc: "binding.ExternalFloatTree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//child-i-ds: arg 1: " + "expected native of type binding.ExternalFloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatTree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, decimal] + // ] + // * error + "Go(binding.ExternalFloatTree)//get": { + Doc: "binding.ExternalFloatTree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//get: arg 1: " + "expected native of type binding.ExternalFloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + dVal = *env.NewDecimal(float64(mVal)) + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatTree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalFloatTree)//get-item": { + Doc: "binding.ExternalFloatTree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//get-item: arg 1: " + "expected native of type binding.ExternalFloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatTree) + // * id - string + // Result: + // * decimal + // * error + "Go(binding.ExternalFloatTree)//get-value": { + Doc: "binding.ExternalFloatTree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//get-value: arg 1: " + "expected native of type binding.ExternalFloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatTree) + // * parent - string + // * id - string + // * value - decimal + // Result: + // * error + "Go(binding.ExternalFloatTree)//prepend": { + Doc: "binding.ExternalFloatTree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//prepend: arg 1: " + "expected native of type binding.ExternalFloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val float64 + if vc, ok := arg3.(env.Decimal); ok { + arg3Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//prepend: arg 4: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatTree) + // Result: + // * error + "Go(binding.ExternalFloatTree)//reload": { + Doc: "binding.ExternalFloatTree.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//reload: arg 1: " + "expected native of type binding.ExternalFloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatTree) + // * id - string + // Result: + // * error + "Go(binding.ExternalFloatTree)//remove": { + Doc: "binding.ExternalFloatTree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//remove: arg 1: " + "expected native of type binding.ExternalFloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatTree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalFloatTree)//remove-listener": { + Doc: "binding.ExternalFloatTree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//remove-listener: arg 1: " + "expected native of type binding.ExternalFloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatTree) + // * ids - dict[string, block[string]] + // * values - dict[string, decimal] + // Result: + // * error + "Go(binding.ExternalFloatTree)//set": { + Doc: "binding.ExternalFloatTree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 1: " + "expected native of type binding.ExternalFloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string]float64 + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string]float64, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV float64 + if vc, ok := v.Series.S[i+1].(env.Decimal); ok { + mapV = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 3: " + "map value: " + "expected decimal, but got " + objectDebugString(ps.Idx, v.Series.S[i+1])) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string]float64, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV float64 + if vc, ok := dictV.(env.Decimal); ok { + mapV = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 3: " + "map value: " + "expected decimal, but got " + objectDebugString(ps.Idx, dictV)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalFloatTree) + // * id - string + // * value - decimal + // Result: + // * error + "Go(binding.ExternalFloatTree)//set-value": { + Doc: "binding.ExternalFloatTree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalFloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalFloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalFloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set-value: arg 1: " + "expected native of type binding.ExternalFloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val float64 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalFloatTree)//set-value: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalInt) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalInt)//add-listener": { + Doc: "binding.ExternalInt.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalInt + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalInt(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalInt); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//add-listener: arg 1: " + "expected native of type binding.ExternalInt, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalInt) + // Result: + // * integer + // * error + "Go(binding.ExternalInt)//get": { + Doc: "binding.ExternalInt.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalInt + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalInt(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalInt); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//get: arg 1: " + "expected native of type binding.ExternalInt, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalInt) + // Result: + // * error + "Go(binding.ExternalInt)//reload": { + Doc: "binding.ExternalInt.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalInt + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalInt(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalInt); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//reload: arg 1: " + "expected native of type binding.ExternalInt, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalInt) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalInt)//remove-listener": { + Doc: "binding.ExternalInt.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalInt + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalInt(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalInt); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//remove-listener: arg 1: " + "expected native of type binding.ExternalInt, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalInt) + // * 1 - integer + // Result: + // * error + "Go(binding.ExternalInt)//set": { + Doc: "binding.ExternalInt.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalInt + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalInt(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalInt); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//set: arg 1: " + "expected native of type binding.ExternalInt, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalInt)//set: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalIntList)//add-listener": { + Doc: "binding.ExternalIntList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//add-listener: arg 1: " + "expected native of type binding.ExternalIntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntList) + // * value - integer + // Result: + // * error + "Go(binding.ExternalIntList)//append": { + Doc: "binding.ExternalIntList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//append: arg 1: " + "expected native of type binding.ExternalIntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//append: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntList) + // Result: + // * block[integer] + // * error + "Go(binding.ExternalIntList)//get": { + Doc: "binding.ExternalIntList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//get: arg 1: " + "expected native of type binding.ExternalIntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalIntList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalIntList)//get-item": { + Doc: "binding.ExternalIntList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//get-item: arg 1: " + "expected native of type binding.ExternalIntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalIntList) + // * index - integer + // Result: + // * integer + // * error + "Go(binding.ExternalIntList)//get-value": { + Doc: "binding.ExternalIntList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//get-value: arg 1: " + "expected native of type binding.ExternalIntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalIntList) + // Result: + // * integer + "Go(binding.ExternalIntList)//length": { + Doc: "binding.ExternalIntList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//length: arg 1: " + "expected native of type binding.ExternalIntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalIntList) + // * value - integer + // Result: + // * error + "Go(binding.ExternalIntList)//prepend": { + Doc: "binding.ExternalIntList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//prepend: arg 1: " + "expected native of type binding.ExternalIntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//prepend: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntList) + // Result: + // * error + "Go(binding.ExternalIntList)//reload": { + Doc: "binding.ExternalIntList.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//reload: arg 1: " + "expected native of type binding.ExternalIntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntList) + // * value - integer + // Result: + // * error + "Go(binding.ExternalIntList)//remove": { + Doc: "binding.ExternalIntList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//remove: arg 1: " + "expected native of type binding.ExternalIntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//remove: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalIntList)//remove-listener": { + Doc: "binding.ExternalIntList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//remove-listener: arg 1: " + "expected native of type binding.ExternalIntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntList) + // * list - block[integer] + // Result: + // * error + "Go(binding.ExternalIntList)//set": { + Doc: "binding.ExternalIntList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//set: arg 1: " + "expected native of type binding.ExternalIntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []int + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]int, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//set: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntList) + // * index - integer + // * value - integer + // Result: + // * error + "Go(binding.ExternalIntList)//set-value": { + Doc: "binding.ExternalIntList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//set-value: arg 1: " + "expected native of type binding.ExternalIntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val int + if vc, ok := arg2.(env.Integer); ok { + arg2Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntList)//set-value: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntTree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalIntTree)//add-listener": { + Doc: "binding.ExternalIntTree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//add-listener: arg 1: " + "expected native of type binding.ExternalIntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntTree) + // * parent - string + // * id - string + // * value - integer + // Result: + // * error + "Go(binding.ExternalIntTree)//append": { + Doc: "binding.ExternalIntTree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//append: arg 1: " + "expected native of type binding.ExternalIntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val int + if vc, ok := arg3.(env.Integer); ok { + arg3Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//append: arg 4: " + "expected integer, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntTree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.ExternalIntTree)//child-i-ds": { + Doc: "binding.ExternalIntTree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//child-i-ds: arg 1: " + "expected native of type binding.ExternalIntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalIntTree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, integer] + // ] + // * error + "Go(binding.ExternalIntTree)//get": { + Doc: "binding.ExternalIntTree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//get: arg 1: " + "expected native of type binding.ExternalIntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + dVal = *env.NewInteger(int64(mVal)) + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.ExternalIntTree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalIntTree)//get-item": { + Doc: "binding.ExternalIntTree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//get-item: arg 1: " + "expected native of type binding.ExternalIntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalIntTree) + // * id - string + // Result: + // * integer + // * error + "Go(binding.ExternalIntTree)//get-value": { + Doc: "binding.ExternalIntTree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//get-value: arg 1: " + "expected native of type binding.ExternalIntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalIntTree) + // * parent - string + // * id - string + // * value - integer + // Result: + // * error + "Go(binding.ExternalIntTree)//prepend": { + Doc: "binding.ExternalIntTree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//prepend: arg 1: " + "expected native of type binding.ExternalIntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val int + if vc, ok := arg3.(env.Integer); ok { + arg3Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//prepend: arg 4: " + "expected integer, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntTree) + // Result: + // * error + "Go(binding.ExternalIntTree)//reload": { + Doc: "binding.ExternalIntTree.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//reload: arg 1: " + "expected native of type binding.ExternalIntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntTree) + // * id - string + // Result: + // * error + "Go(binding.ExternalIntTree)//remove": { + Doc: "binding.ExternalIntTree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//remove: arg 1: " + "expected native of type binding.ExternalIntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntTree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalIntTree)//remove-listener": { + Doc: "binding.ExternalIntTree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//remove-listener: arg 1: " + "expected native of type binding.ExternalIntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntTree) + // * ids - dict[string, block[string]] + // * values - dict[string, integer] + // Result: + // * error + "Go(binding.ExternalIntTree)//set": { + Doc: "binding.ExternalIntTree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 1: " + "expected native of type binding.ExternalIntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string]int + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string]int, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV int + if vc, ok := v.Series.S[i+1].(env.Integer); ok { + mapV = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 3: " + "map value: " + "expected integer, but got " + objectDebugString(ps.Idx, v.Series.S[i+1])) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string]int, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV int + if vc, ok := dictV.(env.Integer); ok { + mapV = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 3: " + "map value: " + "expected integer, but got " + objectDebugString(ps.Idx, dictV)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalIntTree) + // * id - string + // * value - integer + // Result: + // * error + "Go(binding.ExternalIntTree)//set-value": { + Doc: "binding.ExternalIntTree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalIntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalIntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalIntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set-value: arg 1: " + "expected native of type binding.ExternalIntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val int + if vc, ok := arg2.(env.Integer); ok { + arg2Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalIntTree)//set-value: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRune) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalRune)//add-listener": { + Doc: "binding.ExternalRune.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRune + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRune(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRune); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//add-listener: arg 1: " + "expected native of type binding.ExternalRune, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRune) + // Result: + // * Go(rune) + // * error + "Go(binding.ExternalRune)//get": { + Doc: "binding.ExternalRune.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRune + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRune(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRune); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//get: arg 1: " + "expected native of type binding.ExternalRune, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(rune)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalRune) + // Result: + // * error + "Go(binding.ExternalRune)//reload": { + Doc: "binding.ExternalRune.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRune + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRune(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRune); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//reload: arg 1: " + "expected native of type binding.ExternalRune, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRune) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalRune)//remove-listener": { + Doc: "binding.ExternalRune.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRune + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRune(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRune); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//remove-listener: arg 1: " + "expected native of type binding.ExternalRune, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRune) + // * 1 - Go(rune) + // Result: + // * error + "Go(binding.ExternalRune)//set": { + Doc: "binding.ExternalRune.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRune + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRune(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRune); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//set: arg 1: " + "expected native of type binding.ExternalRune, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//set: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRune)//set: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalRuneList)//add-listener": { + Doc: "binding.ExternalRuneList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//add-listener: arg 1: " + "expected native of type binding.ExternalRuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneList) + // * value - Go(rune) + // Result: + // * error + "Go(binding.ExternalRuneList)//append": { + Doc: "binding.ExternalRuneList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//append: arg 1: " + "expected native of type binding.ExternalRuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//append: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//append: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneList) + // Result: + // * block[Go(rune)] + // * error + "Go(binding.ExternalRuneList)//get": { + Doc: "binding.ExternalRuneList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//get: arg 1: " + "expected native of type binding.ExternalRuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewNative(ps.Idx, it, "Go(rune)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalRuneList)//get-item": { + Doc: "binding.ExternalRuneList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//get-item: arg 1: " + "expected native of type binding.ExternalRuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneList) + // * index - integer + // Result: + // * Go(rune) + // * error + "Go(binding.ExternalRuneList)//get-value": { + Doc: "binding.ExternalRuneList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//get-value: arg 1: " + "expected native of type binding.ExternalRuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(rune)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneList) + // Result: + // * integer + "Go(binding.ExternalRuneList)//length": { + Doc: "binding.ExternalRuneList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//length: arg 1: " + "expected native of type binding.ExternalRuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneList) + // * value - Go(rune) + // Result: + // * error + "Go(binding.ExternalRuneList)//prepend": { + Doc: "binding.ExternalRuneList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//prepend: arg 1: " + "expected native of type binding.ExternalRuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//prepend: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//prepend: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneList) + // Result: + // * error + "Go(binding.ExternalRuneList)//reload": { + Doc: "binding.ExternalRuneList.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//reload: arg 1: " + "expected native of type binding.ExternalRuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneList) + // * value - Go(rune) + // Result: + // * error + "Go(binding.ExternalRuneList)//remove": { + Doc: "binding.ExternalRuneList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//remove: arg 1: " + "expected native of type binding.ExternalRuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//remove: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//remove: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalRuneList)//remove-listener": { + Doc: "binding.ExternalRuneList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//remove-listener: arg 1: " + "expected native of type binding.ExternalRuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneList) + // * list - block[Go(rune)] + // Result: + // * error + "Go(binding.ExternalRuneList)//set": { + Doc: "binding.ExternalRuneList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//set: arg 1: " + "expected native of type binding.ExternalRuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []rune + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]rune, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//set: arg 2: " + "block item: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//set: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneList) + // * index - integer + // * value - Go(rune) + // Result: + // * error + "Go(binding.ExternalRuneList)//set-value": { + Doc: "binding.ExternalRuneList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//set-value: arg 1: " + "expected native of type binding.ExternalRuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val rune + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//set-value: arg 3: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneList)//set-value: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneTree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalRuneTree)//add-listener": { + Doc: "binding.ExternalRuneTree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//add-listener: arg 1: " + "expected native of type binding.ExternalRuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneTree) + // * parent - string + // * id - string + // * value - Go(rune) + // Result: + // * error + "Go(binding.ExternalRuneTree)//append": { + Doc: "binding.ExternalRuneTree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//append: arg 1: " + "expected native of type binding.ExternalRuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val rune + switch v := arg3.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//append: arg 4: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//append: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneTree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.ExternalRuneTree)//child-i-ds": { + Doc: "binding.ExternalRuneTree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//child-i-ds: arg 1: " + "expected native of type binding.ExternalRuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneTree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, Go(rune)] + // ] + // * error + "Go(binding.ExternalRuneTree)//get": { + Doc: "binding.ExternalRuneTree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//get: arg 1: " + "expected native of type binding.ExternalRuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + dVal = *env.NewNative(ps.Idx, mVal, "Go(rune)") + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneTree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalRuneTree)//get-item": { + Doc: "binding.ExternalRuneTree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//get-item: arg 1: " + "expected native of type binding.ExternalRuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneTree) + // * id - string + // Result: + // * Go(rune) + // * error + "Go(binding.ExternalRuneTree)//get-value": { + Doc: "binding.ExternalRuneTree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//get-value: arg 1: " + "expected native of type binding.ExternalRuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(rune)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneTree) + // * parent - string + // * id - string + // * value - Go(rune) + // Result: + // * error + "Go(binding.ExternalRuneTree)//prepend": { + Doc: "binding.ExternalRuneTree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//prepend: arg 1: " + "expected native of type binding.ExternalRuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val rune + switch v := arg3.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//prepend: arg 4: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//prepend: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneTree) + // Result: + // * error + "Go(binding.ExternalRuneTree)//reload": { + Doc: "binding.ExternalRuneTree.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//reload: arg 1: " + "expected native of type binding.ExternalRuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneTree) + // * id - string + // Result: + // * error + "Go(binding.ExternalRuneTree)//remove": { + Doc: "binding.ExternalRuneTree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//remove: arg 1: " + "expected native of type binding.ExternalRuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneTree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalRuneTree)//remove-listener": { + Doc: "binding.ExternalRuneTree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//remove-listener: arg 1: " + "expected native of type binding.ExternalRuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneTree) + // * ids - dict[string, block[string]] + // * values - dict[string, Go(rune)] + // Result: + // * error + "Go(binding.ExternalRuneTree)//set": { + Doc: "binding.ExternalRuneTree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 1: " + "expected native of type binding.ExternalRuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string]rune + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string]rune, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV rune + switch v := v.Series.S[i+1].(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 3: " + "map value: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 3: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string]rune, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV rune + switch v := dictV.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 3: " + "map value: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 3: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalRuneTree) + // * id - string + // * value - Go(rune) + // Result: + // * error + "Go(binding.ExternalRuneTree)//set-value": { + Doc: "binding.ExternalRuneTree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalRuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalRuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalRuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set-value: arg 1: " + "expected native of type binding.ExternalRuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val rune + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set-value: arg 3: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalRuneTree)//set-value: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalString) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalString)//add-listener": { + Doc: "binding.ExternalString.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalString + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalString(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalString); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//add-listener: arg 1: " + "expected native of type binding.ExternalString, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalString) + // Result: + // * string + // * error + "Go(binding.ExternalString)//get": { + Doc: "binding.ExternalString.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalString + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalString(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalString); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//get: arg 1: " + "expected native of type binding.ExternalString, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalString) + // Result: + // * error + "Go(binding.ExternalString)//reload": { + Doc: "binding.ExternalString.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalString + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalString(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalString); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//reload: arg 1: " + "expected native of type binding.ExternalString, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalString) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalString)//remove-listener": { + Doc: "binding.ExternalString.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalString + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalString(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalString); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//remove-listener: arg 1: " + "expected native of type binding.ExternalString, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalString) + // * 1 - string + // Result: + // * error + "Go(binding.ExternalString)//set": { + Doc: "binding.ExternalString.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalString + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalString(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalString); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//set: arg 1: " + "expected native of type binding.ExternalString, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalString)//set: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalStringList)//add-listener": { + Doc: "binding.ExternalStringList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//add-listener: arg 1: " + "expected native of type binding.ExternalStringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringList) + // * value - string + // Result: + // * error + "Go(binding.ExternalStringList)//append": { + Doc: "binding.ExternalStringList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//append: arg 1: " + "expected native of type binding.ExternalStringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringList) + // Result: + // * block[string] + // * error + "Go(binding.ExternalStringList)//get": { + Doc: "binding.ExternalStringList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//get: arg 1: " + "expected native of type binding.ExternalStringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalStringList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalStringList)//get-item": { + Doc: "binding.ExternalStringList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//get-item: arg 1: " + "expected native of type binding.ExternalStringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalStringList) + // * index - integer + // Result: + // * string + // * error + "Go(binding.ExternalStringList)//get-value": { + Doc: "binding.ExternalStringList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//get-value: arg 1: " + "expected native of type binding.ExternalStringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewString(res0) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalStringList) + // Result: + // * integer + "Go(binding.ExternalStringList)//length": { + Doc: "binding.ExternalStringList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//length: arg 1: " + "expected native of type binding.ExternalStringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalStringList) + // * value - string + // Result: + // * error + "Go(binding.ExternalStringList)//prepend": { + Doc: "binding.ExternalStringList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//prepend: arg 1: " + "expected native of type binding.ExternalStringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringList) + // Result: + // * error + "Go(binding.ExternalStringList)//reload": { + Doc: "binding.ExternalStringList.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//reload: arg 1: " + "expected native of type binding.ExternalStringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringList) + // * value - string + // Result: + // * error + "Go(binding.ExternalStringList)//remove": { + Doc: "binding.ExternalStringList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//remove: arg 1: " + "expected native of type binding.ExternalStringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalStringList)//remove-listener": { + Doc: "binding.ExternalStringList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//remove-listener: arg 1: " + "expected native of type binding.ExternalStringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringList) + // * list - block[string] + // Result: + // * error + "Go(binding.ExternalStringList)//set": { + Doc: "binding.ExternalStringList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//set: arg 1: " + "expected native of type binding.ExternalStringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []string + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//set: arg 2: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringList) + // * index - integer + // * value - string + // Result: + // * error + "Go(binding.ExternalStringList)//set-value": { + Doc: "binding.ExternalStringList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//set-value: arg 1: " + "expected native of type binding.ExternalStringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringList)//set-value: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringTree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalStringTree)//add-listener": { + Doc: "binding.ExternalStringTree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//add-listener: arg 1: " + "expected native of type binding.ExternalStringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringTree) + // * parent - string + // * id - string + // * value - string + // Result: + // * error + "Go(binding.ExternalStringTree)//append": { + Doc: "binding.ExternalStringTree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//append: arg 1: " + "expected native of type binding.ExternalStringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val string + if vc, ok := arg3.(env.String); ok { + arg3Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//append: arg 4: " + "expected string, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringTree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.ExternalStringTree)//child-i-ds": { + Doc: "binding.ExternalStringTree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//child-i-ds: arg 1: " + "expected native of type binding.ExternalStringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalStringTree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, string] + // ] + // * error + "Go(binding.ExternalStringTree)//get": { + Doc: "binding.ExternalStringTree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//get: arg 1: " + "expected native of type binding.ExternalStringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + dVal = *env.NewString(mVal) + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.ExternalStringTree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalStringTree)//get-item": { + Doc: "binding.ExternalStringTree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//get-item: arg 1: " + "expected native of type binding.ExternalStringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalStringTree) + // * id - string + // Result: + // * string + // * error + "Go(binding.ExternalStringTree)//get-value": { + Doc: "binding.ExternalStringTree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//get-value: arg 1: " + "expected native of type binding.ExternalStringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewString(res0) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalStringTree) + // * parent - string + // * id - string + // * value - string + // Result: + // * error + "Go(binding.ExternalStringTree)//prepend": { + Doc: "binding.ExternalStringTree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//prepend: arg 1: " + "expected native of type binding.ExternalStringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val string + if vc, ok := arg3.(env.String); ok { + arg3Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//prepend: arg 4: " + "expected string, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringTree) + // Result: + // * error + "Go(binding.ExternalStringTree)//reload": { + Doc: "binding.ExternalStringTree.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//reload: arg 1: " + "expected native of type binding.ExternalStringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringTree) + // * id - string + // Result: + // * error + "Go(binding.ExternalStringTree)//remove": { + Doc: "binding.ExternalStringTree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//remove: arg 1: " + "expected native of type binding.ExternalStringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringTree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalStringTree)//remove-listener": { + Doc: "binding.ExternalStringTree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//remove-listener: arg 1: " + "expected native of type binding.ExternalStringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringTree) + // * ids - dict[string, block[string]] + // * values - dict[string, string] + // Result: + // * error + "Go(binding.ExternalStringTree)//set": { + Doc: "binding.ExternalStringTree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 1: " + "expected native of type binding.ExternalStringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string]string + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV string + if vc, ok := v.Series.S[i+1].(env.String); ok { + mapV = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 3: " + "map value: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+1])) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV string + if vc, ok := dictV.(env.String); ok { + mapV = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 3: " + "map value: " + "expected string, but got " + objectDebugString(ps.Idx, dictV)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalStringTree) + // * id - string + // * value - string + // Result: + // * error + "Go(binding.ExternalStringTree)//set-value": { + Doc: "binding.ExternalStringTree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalStringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalStringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalStringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set-value: arg 1: " + "expected native of type binding.ExternalStringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalStringTree)//set-value: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURI) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalURI)//add-listener": { + Doc: "binding.ExternalURI.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//add-listener: arg 1: " + "expected native of type binding.ExternalURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURI) + // Result: + // * Go(fyne.URI) + // * error + "Go(binding.ExternalURI)//get": { + Doc: "binding.ExternalURI.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//get: arg 1: " + "expected native of type binding.ExternalURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalURI) + // Result: + // * error + "Go(binding.ExternalURI)//reload": { + Doc: "binding.ExternalURI.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//reload: arg 1: " + "expected native of type binding.ExternalURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURI) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalURI)//remove-listener": { + Doc: "binding.ExternalURI.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//remove-listener: arg 1: " + "expected native of type binding.ExternalURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURI) + // * 1 - Go(fyne.URI) + // Result: + // * error + "Go(binding.ExternalURI)//set": { + Doc: "binding.ExternalURI.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//set: arg 1: " + "expected native of type binding.ExternalURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//set: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//set: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURI)//set: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURIList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalURIList)//add-listener": { + Doc: "binding.ExternalURIList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//add-listener: arg 1: " + "expected native of type binding.ExternalURIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURIList) + // * value - Go(fyne.URI) + // Result: + // * error + "Go(binding.ExternalURIList)//append": { + Doc: "binding.ExternalURIList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//append: arg 1: " + "expected native of type binding.ExternalURIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//append: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//append: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//append: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//append: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURIList) + // Result: + // * block[Go(fyne.URI)] + // * error + "Go(binding.ExternalURIList)//get": { + Doc: "binding.ExternalURIList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//get: arg 1: " + "expected native of type binding.ExternalURIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.URI)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalURIList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalURIList)//get-item": { + Doc: "binding.ExternalURIList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//get-item: arg 1: " + "expected native of type binding.ExternalURIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalURIList) + // * index - integer + // Result: + // * Go(fyne.URI) + // * error + "Go(binding.ExternalURIList)//get-value": { + Doc: "binding.ExternalURIList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//get-value: arg 1: " + "expected native of type binding.ExternalURIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalURIList) + // Result: + // * integer + "Go(binding.ExternalURIList)//length": { + Doc: "binding.ExternalURIList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//length: arg 1: " + "expected native of type binding.ExternalURIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalURIList) + // * value - Go(fyne.URI) + // Result: + // * error + "Go(binding.ExternalURIList)//prepend": { + Doc: "binding.ExternalURIList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//prepend: arg 1: " + "expected native of type binding.ExternalURIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//prepend: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//prepend: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//prepend: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//prepend: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURIList) + // Result: + // * error + "Go(binding.ExternalURIList)//reload": { + Doc: "binding.ExternalURIList.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//reload: arg 1: " + "expected native of type binding.ExternalURIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURIList) + // * value - Go(fyne.URI) + // Result: + // * error + "Go(binding.ExternalURIList)//remove": { + Doc: "binding.ExternalURIList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove: arg 1: " + "expected native of type binding.ExternalURIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURIList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalURIList)//remove-listener": { + Doc: "binding.ExternalURIList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove-listener: arg 1: " + "expected native of type binding.ExternalURIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURIList) + // * list - block[Go(fyne.URI)] + // Result: + // * error + "Go(binding.ExternalURIList)//set": { + Doc: "binding.ExternalURIList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set: arg 1: " + "expected native of type binding.ExternalURIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []fyne.URI + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]fyne.URI, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set: arg 2: " + "block item: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURIList) + // * index - integer + // * value - Go(fyne.URI) + // Result: + // * error + "Go(binding.ExternalURIList)//set-value": { + Doc: "binding.ExternalURIList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set-value: arg 1: " + "expected native of type binding.ExternalURIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.URI + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set-value: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set-value: arg 3: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set-value: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURIList)//set-value: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURITree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalURITree)//add-listener": { + Doc: "binding.ExternalURITree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//add-listener: arg 1: " + "expected native of type binding.ExternalURITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURITree) + // * parent - string + // * id - string + // * value - Go(fyne.URI) + // Result: + // * error + "Go(binding.ExternalURITree)//append": { + Doc: "binding.ExternalURITree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//append: arg 1: " + "expected native of type binding.ExternalURITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val fyne.URI + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//append: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//append: arg 4: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//append: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//append: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURITree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.ExternalURITree)//child-i-ds": { + Doc: "binding.ExternalURITree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//child-i-ds: arg 1: " + "expected native of type binding.ExternalURITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalURITree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, Go(fyne.URI)] + // ] + // * error + "Go(binding.ExternalURITree)//get": { + Doc: "binding.ExternalURITree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//get: arg 1: " + "expected native of type binding.ExternalURITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + dVal = ifaceToNative(ps.Idx, mVal, "Go(fyne.URI)") + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.ExternalURITree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalURITree)//get-item": { + Doc: "binding.ExternalURITree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//get-item: arg 1: " + "expected native of type binding.ExternalURITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalURITree) + // * id - string + // Result: + // * Go(fyne.URI) + // * error + "Go(binding.ExternalURITree)//get-value": { + Doc: "binding.ExternalURITree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//get-value: arg 1: " + "expected native of type binding.ExternalURITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalURITree) + // * parent - string + // * id - string + // * value - Go(fyne.URI) + // Result: + // * error + "Go(binding.ExternalURITree)//prepend": { + Doc: "binding.ExternalURITree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//prepend: arg 1: " + "expected native of type binding.ExternalURITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val fyne.URI + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//prepend: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//prepend: arg 4: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//prepend: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//prepend: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURITree) + // Result: + // * error + "Go(binding.ExternalURITree)//reload": { + Doc: "binding.ExternalURITree.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//reload: arg 1: " + "expected native of type binding.ExternalURITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURITree) + // * id - string + // Result: + // * error + "Go(binding.ExternalURITree)//remove": { + Doc: "binding.ExternalURITree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//remove: arg 1: " + "expected native of type binding.ExternalURITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURITree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalURITree)//remove-listener": { + Doc: "binding.ExternalURITree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//remove-listener: arg 1: " + "expected native of type binding.ExternalURITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURITree) + // * ids - dict[string, block[string]] + // * values - dict[string, Go(fyne.URI)] + // Result: + // * error + "Go(binding.ExternalURITree)//set": { + Doc: "binding.ExternalURITree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 1: " + "expected native of type binding.ExternalURITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string]fyne.URI + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string]fyne.URI, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV fyne.URI + switch v := v.Series.S[i+1].(type) { + case env.RyeCtx: + var err error + mapV, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 3: " + "map value: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 3: " + "map value: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 3: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 3: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string]fyne.URI, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV fyne.URI + switch v := dictV.(type) { + case env.RyeCtx: + var err error + mapV, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 3: " + "map value: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 3: " + "map value: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 3: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 3: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalURITree) + // * id - string + // * value - Go(fyne.URI) + // Result: + // * error + "Go(binding.ExternalURITree)//set-value": { + Doc: "binding.ExternalURITree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalURITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalURITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalURITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set-value: arg 1: " + "expected native of type binding.ExternalURITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.URI + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set-value: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set-value: arg 3: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set-value: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalURITree)//set-value: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntyped) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalUntyped)//add-listener": { + Doc: "binding.ExternalUntyped.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntyped + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntyped(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntyped); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//add-listener: arg 1: " + "expected native of type binding.ExternalUntyped, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntyped) + // Result: + // * Go(any) + // * error + "Go(binding.ExternalUntyped)//get": { + Doc: "binding.ExternalUntyped.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntyped + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntyped(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntyped); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//get: arg 1: " + "expected native of type binding.ExternalUntyped, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(any)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalUntyped) + // Result: + // * error + "Go(binding.ExternalUntyped)//reload": { + Doc: "binding.ExternalUntyped.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntyped + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntyped(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntyped); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//reload: arg 1: " + "expected native of type binding.ExternalUntyped, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntyped) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalUntyped)//remove-listener": { + Doc: "binding.ExternalUntyped.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntyped + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntyped(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntyped); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//remove-listener: arg 1: " + "expected native of type binding.ExternalUntyped, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntyped) + // * 1 - Go(any) + // Result: + // * error + "Go(binding.ExternalUntyped)//set": { + Doc: "binding.ExternalUntyped.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntyped + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntyped(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntyped); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//set: arg 1: " + "expected native of type binding.ExternalUntyped, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val any + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//set: arg 2: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntyped)//set: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalUntypedList)//add-listener": { + Doc: "binding.ExternalUntypedList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//add-listener: arg 1: " + "expected native of type binding.ExternalUntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedList) + // * value - Go(any) + // Result: + // * error + "Go(binding.ExternalUntypedList)//append": { + Doc: "binding.ExternalUntypedList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//append: arg 1: " + "expected native of type binding.ExternalUntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val any + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//append: arg 2: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//append: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedList) + // Result: + // * block[Go(any)] + // * error + "Go(binding.ExternalUntypedList)//get": { + Doc: "binding.ExternalUntypedList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//get: arg 1: " + "expected native of type binding.ExternalUntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewNative(ps.Idx, it, "Go(any)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalUntypedList)//get-item": { + Doc: "binding.ExternalUntypedList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//get-item: arg 1: " + "expected native of type binding.ExternalUntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedList) + // * index - integer + // Result: + // * Go(any) + // * error + "Go(binding.ExternalUntypedList)//get-value": { + Doc: "binding.ExternalUntypedList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//get-value: arg 1: " + "expected native of type binding.ExternalUntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(any)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedList) + // Result: + // * integer + "Go(binding.ExternalUntypedList)//length": { + Doc: "binding.ExternalUntypedList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//length: arg 1: " + "expected native of type binding.ExternalUntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedList) + // * value - Go(any) + // Result: + // * error + "Go(binding.ExternalUntypedList)//prepend": { + Doc: "binding.ExternalUntypedList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//prepend: arg 1: " + "expected native of type binding.ExternalUntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val any + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//prepend: arg 2: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//prepend: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedList) + // Result: + // * error + "Go(binding.ExternalUntypedList)//reload": { + Doc: "binding.ExternalUntypedList.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//reload: arg 1: " + "expected native of type binding.ExternalUntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedList) + // * value - Go(any) + // Result: + // * error + "Go(binding.ExternalUntypedList)//remove": { + Doc: "binding.ExternalUntypedList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//remove: arg 1: " + "expected native of type binding.ExternalUntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val any + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//remove: arg 2: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//remove: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedList) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalUntypedList)//remove-listener": { + Doc: "binding.ExternalUntypedList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//remove-listener: arg 1: " + "expected native of type binding.ExternalUntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedList) + // * list - block[Go(any)] + // Result: + // * error + "Go(binding.ExternalUntypedList)//set": { + Doc: "binding.ExternalUntypedList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//set: arg 1: " + "expected native of type binding.ExternalUntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []any + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]any, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//set: arg 2: " + "block item: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//set: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedList) + // * index - integer + // * value - Go(any) + // Result: + // * error + "Go(binding.ExternalUntypedList)//set-value": { + Doc: "binding.ExternalUntypedList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//set-value: arg 1: " + "expected native of type binding.ExternalUntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val any + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//set-value: arg 3: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedList)//set-value: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedMap) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalUntypedMap)//add-listener": { + Doc: "binding.ExternalUntypedMap.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//add-listener: arg 1: " + "expected native of type binding.ExternalUntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedMap) + // * 1 - string + "Go(binding.ExternalUntypedMap)//delete": { + Doc: "binding.ExternalUntypedMap.Delete", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//delete: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//delete: arg 1: " + "expected native of type binding.ExternalUntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//delete: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//delete: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//delete: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.Delete(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedMap) + // Result: + // * dict[string, Go(any)] + // * error + "Go(binding.ExternalUntypedMap)//get": { + Doc: "binding.ExternalUntypedMap.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//get: arg 1: " + "expected native of type binding.ExternalUntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + dVal = *env.NewNative(ps.Idx, mVal, "Go(any)") + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedMap) + // * 1 - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalUntypedMap)//get-item": { + Doc: "binding.ExternalUntypedMap.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//get-item: arg 1: " + "expected native of type binding.ExternalUntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedMap) + // * 1 - string + // Result: + // * Go(any) + // * error + "Go(binding.ExternalUntypedMap)//get-value": { + Doc: "binding.ExternalUntypedMap.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//get-value: arg 1: " + "expected native of type binding.ExternalUntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(any)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedMap) + // Result: + // * block[string] + "Go(binding.ExternalUntypedMap)//keys": { + Doc: "binding.ExternalUntypedMap.Keys", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//keys: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//keys: arg 1: " + "expected native of type binding.ExternalUntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//keys: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//keys: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Keys() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedMap) + // Result: + // * error + "Go(binding.ExternalUntypedMap)//reload": { + Doc: "binding.ExternalUntypedMap.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//reload: arg 1: " + "expected native of type binding.ExternalUntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedMap) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalUntypedMap)//remove-listener": { + Doc: "binding.ExternalUntypedMap.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//remove-listener: arg 1: " + "expected native of type binding.ExternalUntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedMap) + // * 1 - dict[string, Go(any)] + // Result: + // * error + "Go(binding.ExternalUntypedMap)//set": { + Doc: "binding.ExternalUntypedMap.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set: arg 1: " + "expected native of type binding.ExternalUntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string]any + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string]any, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV any + switch v := v.Series.S[i+1].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set: arg 2: " + "map value: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set: arg 2: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string]any, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV any + switch v := dictV.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set: arg 2: " + "map value: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set: arg 2: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedMap) + // * 1 - string + // * 2 - Go(any) + // Result: + // * error + "Go(binding.ExternalUntypedMap)//set-value": { + Doc: "binding.ExternalUntypedMap.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set-value: arg 1: " + "expected native of type binding.ExternalUntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val any + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set-value: arg 3: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedMap)//set-value: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedTree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalUntypedTree)//add-listener": { + Doc: "binding.ExternalUntypedTree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//add-listener: arg 1: " + "expected native of type binding.ExternalUntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedTree) + // * parent - string + // * id - string + // * value - Go(any) + // Result: + // * error + "Go(binding.ExternalUntypedTree)//append": { + Doc: "binding.ExternalUntypedTree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//append: arg 1: " + "expected native of type binding.ExternalUntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val any + switch v := arg3.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//append: arg 4: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//append: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedTree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.ExternalUntypedTree)//child-i-ds": { + Doc: "binding.ExternalUntypedTree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//child-i-ds: arg 1: " + "expected native of type binding.ExternalUntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedTree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, Go(any)] + // ] + // * error + "Go(binding.ExternalUntypedTree)//get": { + Doc: "binding.ExternalUntypedTree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//get: arg 1: " + "expected native of type binding.ExternalUntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + dVal = *env.NewNative(ps.Idx, mVal, "Go(any)") + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedTree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.ExternalUntypedTree)//get-item": { + Doc: "binding.ExternalUntypedTree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//get-item: arg 1: " + "expected native of type binding.ExternalUntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedTree) + // * id - string + // Result: + // * Go(any) + // * error + "Go(binding.ExternalUntypedTree)//get-value": { + Doc: "binding.ExternalUntypedTree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//get-value: arg 1: " + "expected native of type binding.ExternalUntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(any)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedTree) + // * parent - string + // * id - string + // * value - Go(any) + // Result: + // * error + "Go(binding.ExternalUntypedTree)//prepend": { + Doc: "binding.ExternalUntypedTree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//prepend: arg 1: " + "expected native of type binding.ExternalUntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val any + switch v := arg3.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//prepend: arg 4: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//prepend: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedTree) + // Result: + // * error + "Go(binding.ExternalUntypedTree)//reload": { + Doc: "binding.ExternalUntypedTree.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//reload: arg 1: " + "expected native of type binding.ExternalUntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedTree) + // * id - string + // Result: + // * error + "Go(binding.ExternalUntypedTree)//remove": { + Doc: "binding.ExternalUntypedTree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//remove: arg 1: " + "expected native of type binding.ExternalUntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedTree) + // * 1 - Go(binding.DataListener) + "Go(binding.ExternalUntypedTree)//remove-listener": { + Doc: "binding.ExternalUntypedTree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//remove-listener: arg 1: " + "expected native of type binding.ExternalUntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedTree) + // * ids - dict[string, block[string]] + // * values - dict[string, Go(any)] + // Result: + // * error + "Go(binding.ExternalUntypedTree)//set": { + Doc: "binding.ExternalUntypedTree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 1: " + "expected native of type binding.ExternalUntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string]any + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string]any, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV any + switch v := v.Series.S[i+1].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 3: " + "map value: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 3: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string]any, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV any + switch v := dictV.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 3: " + "map value: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 3: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.ExternalUntypedTree) + // * id - string + // * value - Go(any) + // Result: + // * error + "Go(binding.ExternalUntypedTree)//set-value": { + Doc: "binding.ExternalUntypedTree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.ExternalUntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_ExternalUntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.ExternalUntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set-value: arg 1: " + "expected native of type binding.ExternalUntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val any + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set-value: arg 3: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.ExternalUntypedTree)//set-value: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Float) + // * 1 - Go(binding.DataListener) + "Go(binding.Float)//add-listener": { + Doc: "binding.Float.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Float + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Float(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Float); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//add-listener: arg 1: " + "expected native of type binding.Float, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Float) + // Result: + // * decimal + // * error + "Go(binding.Float)//get": { + Doc: "binding.Float.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Float + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Float(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Float); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//get: arg 1: " + "expected native of type binding.Float, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.Float) + // * 1 - Go(binding.DataListener) + "Go(binding.Float)//remove-listener": { + Doc: "binding.Float.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Float + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Float(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Float); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//remove-listener: arg 1: " + "expected native of type binding.Float, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Float) + // * 1 - decimal + // Result: + // * error + "Go(binding.Float)//set": { + Doc: "binding.Float.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Float + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Float(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Float); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//set: arg 1: " + "expected native of type binding.Float, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float64 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Float)//set: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.FloatList) + // * 1 - Go(binding.DataListener) + "Go(binding.FloatList)//add-listener": { + Doc: "binding.FloatList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//add-listener: arg 1: " + "expected native of type binding.FloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.FloatList) + // * value - decimal + // Result: + // * error + "Go(binding.FloatList)//append": { + Doc: "binding.FloatList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//append: arg 1: " + "expected native of type binding.FloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float64 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//append: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.FloatList) + // Result: + // * block[decimal] + // * error + "Go(binding.FloatList)//get": { + Doc: "binding.FloatList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//get: arg 1: " + "expected native of type binding.FloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewDecimal(float64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.FloatList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.FloatList)//get-item": { + Doc: "binding.FloatList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//get-item: arg 1: " + "expected native of type binding.FloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.FloatList) + // * index - integer + // Result: + // * decimal + // * error + "Go(binding.FloatList)//get-value": { + Doc: "binding.FloatList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//get-value: arg 1: " + "expected native of type binding.FloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.FloatList) + // Result: + // * integer + "Go(binding.FloatList)//length": { + Doc: "binding.FloatList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//length: arg 1: " + "expected native of type binding.FloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.FloatList) + // * value - decimal + // Result: + // * error + "Go(binding.FloatList)//prepend": { + Doc: "binding.FloatList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//prepend: arg 1: " + "expected native of type binding.FloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float64 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//prepend: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.FloatList) + // * value - decimal + // Result: + // * error + "Go(binding.FloatList)//remove": { + Doc: "binding.FloatList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//remove: arg 1: " + "expected native of type binding.FloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float64 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//remove: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.FloatList) + // * 1 - Go(binding.DataListener) + "Go(binding.FloatList)//remove-listener": { + Doc: "binding.FloatList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//remove-listener: arg 1: " + "expected native of type binding.FloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.FloatList) + // * list - block[decimal] + // Result: + // * error + "Go(binding.FloatList)//set": { + Doc: "binding.FloatList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//set: arg 1: " + "expected native of type binding.FloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []float64 + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]float64, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Decimal); ok { + (*iv) = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//set: arg 2: " + "block item: " + "expected decimal, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.FloatList) + // * index - integer + // * value - decimal + // Result: + // * error + "Go(binding.FloatList)//set-value": { + Doc: "binding.FloatList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//set-value: arg 1: " + "expected native of type binding.FloatList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val float64 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatList)//set-value: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.FloatTree) + // * 1 - Go(binding.DataListener) + "Go(binding.FloatTree)//add-listener": { + Doc: "binding.FloatTree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//add-listener: arg 1: " + "expected native of type binding.FloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.FloatTree) + // * parent - string + // * id - string + // * value - decimal + // Result: + // * error + "Go(binding.FloatTree)//append": { + Doc: "binding.FloatTree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//append: arg 1: " + "expected native of type binding.FloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val float64 + if vc, ok := arg3.(env.Decimal); ok { + arg3Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//append: arg 4: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.FloatTree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.FloatTree)//child-i-ds": { + Doc: "binding.FloatTree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//child-i-ds: arg 1: " + "expected native of type binding.FloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.FloatTree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, decimal] + // ] + // * error + "Go(binding.FloatTree)//get": { + Doc: "binding.FloatTree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//get: arg 1: " + "expected native of type binding.FloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + dVal = *env.NewDecimal(float64(mVal)) + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.FloatTree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.FloatTree)//get-item": { + Doc: "binding.FloatTree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//get-item: arg 1: " + "expected native of type binding.FloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.FloatTree) + // * id - string + // Result: + // * decimal + // * error + "Go(binding.FloatTree)//get-value": { + Doc: "binding.FloatTree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//get-value: arg 1: " + "expected native of type binding.FloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.FloatTree) + // * parent - string + // * id - string + // * value - decimal + // Result: + // * error + "Go(binding.FloatTree)//prepend": { + Doc: "binding.FloatTree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//prepend: arg 1: " + "expected native of type binding.FloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val float64 + if vc, ok := arg3.(env.Decimal); ok { + arg3Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//prepend: arg 4: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.FloatTree) + // * id - string + // Result: + // * error + "Go(binding.FloatTree)//remove": { + Doc: "binding.FloatTree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//remove: arg 1: " + "expected native of type binding.FloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.FloatTree) + // * 1 - Go(binding.DataListener) + "Go(binding.FloatTree)//remove-listener": { + Doc: "binding.FloatTree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//remove-listener: arg 1: " + "expected native of type binding.FloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.FloatTree) + // * ids - dict[string, block[string]] + // * values - dict[string, decimal] + // Result: + // * error + "Go(binding.FloatTree)//set": { + Doc: "binding.FloatTree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 1: " + "expected native of type binding.FloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string]float64 + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string]float64, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV float64 + if vc, ok := v.Series.S[i+1].(env.Decimal); ok { + mapV = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 3: " + "map value: " + "expected decimal, but got " + objectDebugString(ps.Idx, v.Series.S[i+1])) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string]float64, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV float64 + if vc, ok := dictV.(env.Decimal); ok { + mapV = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 3: " + "map value: " + "expected decimal, but got " + objectDebugString(ps.Idx, dictV)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.FloatTree) + // * id - string + // * value - decimal + // Result: + // * error + "Go(binding.FloatTree)//set-value": { + Doc: "binding.FloatTree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.FloatTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_FloatTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.FloatTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set-value: arg 1: " + "expected native of type binding.FloatTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val float64 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.FloatTree)//set-value: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Int) + // * 1 - Go(binding.DataListener) + "Go(binding.Int)//add-listener": { + Doc: "binding.Int.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Int + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Int(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Int); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//add-listener: arg 1: " + "expected native of type binding.Int, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Int) + // Result: + // * integer + // * error + "Go(binding.Int)//get": { + Doc: "binding.Int.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Int + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Int(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Int); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//get: arg 1: " + "expected native of type binding.Int, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.Int) + // * 1 - Go(binding.DataListener) + "Go(binding.Int)//remove-listener": { + Doc: "binding.Int.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Int + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Int(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Int); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//remove-listener: arg 1: " + "expected native of type binding.Int, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Int) + // * 1 - integer + // Result: + // * error + "Go(binding.Int)//set": { + Doc: "binding.Int.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Int + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Int(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Int); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//set: arg 1: " + "expected native of type binding.Int, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Int)//set: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.IntList) + // * 1 - Go(binding.DataListener) + "Go(binding.IntList)//add-listener": { + Doc: "binding.IntList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//add-listener: arg 1: " + "expected native of type binding.IntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.IntList) + // * value - integer + // Result: + // * error + "Go(binding.IntList)//append": { + Doc: "binding.IntList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//append: arg 1: " + "expected native of type binding.IntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//append: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.IntList) + // Result: + // * block[integer] + // * error + "Go(binding.IntList)//get": { + Doc: "binding.IntList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//get: arg 1: " + "expected native of type binding.IntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.IntList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.IntList)//get-item": { + Doc: "binding.IntList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//get-item: arg 1: " + "expected native of type binding.IntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.IntList) + // * index - integer + // Result: + // * integer + // * error + "Go(binding.IntList)//get-value": { + Doc: "binding.IntList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//get-value: arg 1: " + "expected native of type binding.IntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.IntList) + // Result: + // * integer + "Go(binding.IntList)//length": { + Doc: "binding.IntList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//length: arg 1: " + "expected native of type binding.IntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.IntList) + // * value - integer + // Result: + // * error + "Go(binding.IntList)//prepend": { + Doc: "binding.IntList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//prepend: arg 1: " + "expected native of type binding.IntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//prepend: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.IntList) + // * value - integer + // Result: + // * error + "Go(binding.IntList)//remove": { + Doc: "binding.IntList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//remove: arg 1: " + "expected native of type binding.IntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//remove: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.IntList) + // * 1 - Go(binding.DataListener) + "Go(binding.IntList)//remove-listener": { + Doc: "binding.IntList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//remove-listener: arg 1: " + "expected native of type binding.IntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.IntList) + // * list - block[integer] + // Result: + // * error + "Go(binding.IntList)//set": { + Doc: "binding.IntList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//set: arg 1: " + "expected native of type binding.IntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []int + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]int, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//set: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.IntList) + // * index - integer + // * value - integer + // Result: + // * error + "Go(binding.IntList)//set-value": { + Doc: "binding.IntList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//set-value: arg 1: " + "expected native of type binding.IntList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val int + if vc, ok := arg2.(env.Integer); ok { + arg2Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntList)//set-value: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.IntTree) + // * 1 - Go(binding.DataListener) + "Go(binding.IntTree)//add-listener": { + Doc: "binding.IntTree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//add-listener: arg 1: " + "expected native of type binding.IntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.IntTree) + // * parent - string + // * id - string + // * value - integer + // Result: + // * error + "Go(binding.IntTree)//append": { + Doc: "binding.IntTree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//append: arg 1: " + "expected native of type binding.IntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val int + if vc, ok := arg3.(env.Integer); ok { + arg3Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//append: arg 4: " + "expected integer, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.IntTree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.IntTree)//child-i-ds": { + Doc: "binding.IntTree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//child-i-ds: arg 1: " + "expected native of type binding.IntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.IntTree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, integer] + // ] + // * error + "Go(binding.IntTree)//get": { + Doc: "binding.IntTree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//get: arg 1: " + "expected native of type binding.IntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + dVal = *env.NewInteger(int64(mVal)) + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.IntTree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.IntTree)//get-item": { + Doc: "binding.IntTree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//get-item: arg 1: " + "expected native of type binding.IntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.IntTree) + // * id - string + // Result: + // * integer + // * error + "Go(binding.IntTree)//get-value": { + Doc: "binding.IntTree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//get-value: arg 1: " + "expected native of type binding.IntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.IntTree) + // * parent - string + // * id - string + // * value - integer + // Result: + // * error + "Go(binding.IntTree)//prepend": { + Doc: "binding.IntTree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//prepend: arg 1: " + "expected native of type binding.IntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val int + if vc, ok := arg3.(env.Integer); ok { + arg3Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//prepend: arg 4: " + "expected integer, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.IntTree) + // * id - string + // Result: + // * error + "Go(binding.IntTree)//remove": { + Doc: "binding.IntTree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//remove: arg 1: " + "expected native of type binding.IntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.IntTree) + // * 1 - Go(binding.DataListener) + "Go(binding.IntTree)//remove-listener": { + Doc: "binding.IntTree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//remove-listener: arg 1: " + "expected native of type binding.IntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.IntTree) + // * ids - dict[string, block[string]] + // * values - dict[string, integer] + // Result: + // * error + "Go(binding.IntTree)//set": { + Doc: "binding.IntTree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 1: " + "expected native of type binding.IntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string]int + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string]int, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV int + if vc, ok := v.Series.S[i+1].(env.Integer); ok { + mapV = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 3: " + "map value: " + "expected integer, but got " + objectDebugString(ps.Idx, v.Series.S[i+1])) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string]int, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV int + if vc, ok := dictV.(env.Integer); ok { + mapV = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 3: " + "map value: " + "expected integer, but got " + objectDebugString(ps.Idx, dictV)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.IntTree) + // * id - string + // * value - integer + // Result: + // * error + "Go(binding.IntTree)//set-value": { + Doc: "binding.IntTree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.IntTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_IntTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.IntTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set-value: arg 1: " + "expected native of type binding.IntTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val int + if vc, ok := arg2.(env.Integer); ok { + arg2Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.IntTree)//set-value: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Rune) + // * 1 - Go(binding.DataListener) + "Go(binding.Rune)//add-listener": { + Doc: "binding.Rune.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Rune + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Rune(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Rune); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//add-listener: arg 1: " + "expected native of type binding.Rune, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Rune) + // Result: + // * Go(rune) + // * error + "Go(binding.Rune)//get": { + Doc: "binding.Rune.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Rune + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Rune(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Rune); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//get: arg 1: " + "expected native of type binding.Rune, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(rune)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.Rune) + // * 1 - Go(binding.DataListener) + "Go(binding.Rune)//remove-listener": { + Doc: "binding.Rune.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Rune + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Rune(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Rune); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//remove-listener: arg 1: " + "expected native of type binding.Rune, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Rune) + // * 1 - Go(rune) + // Result: + // * error + "Go(binding.Rune)//set": { + Doc: "binding.Rune.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Rune + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Rune(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Rune); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//set: arg 1: " + "expected native of type binding.Rune, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//set: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Rune)//set: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.RuneList) + // * 1 - Go(binding.DataListener) + "Go(binding.RuneList)//add-listener": { + Doc: "binding.RuneList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//add-listener: arg 1: " + "expected native of type binding.RuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.RuneList) + // * value - Go(rune) + // Result: + // * error + "Go(binding.RuneList)//append": { + Doc: "binding.RuneList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//append: arg 1: " + "expected native of type binding.RuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//append: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//append: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.RuneList) + // Result: + // * block[Go(rune)] + // * error + "Go(binding.RuneList)//get": { + Doc: "binding.RuneList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//get: arg 1: " + "expected native of type binding.RuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewNative(ps.Idx, it, "Go(rune)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.RuneList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.RuneList)//get-item": { + Doc: "binding.RuneList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//get-item: arg 1: " + "expected native of type binding.RuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.RuneList) + // * index - integer + // Result: + // * Go(rune) + // * error + "Go(binding.RuneList)//get-value": { + Doc: "binding.RuneList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//get-value: arg 1: " + "expected native of type binding.RuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(rune)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.RuneList) + // Result: + // * integer + "Go(binding.RuneList)//length": { + Doc: "binding.RuneList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//length: arg 1: " + "expected native of type binding.RuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.RuneList) + // * value - Go(rune) + // Result: + // * error + "Go(binding.RuneList)//prepend": { + Doc: "binding.RuneList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//prepend: arg 1: " + "expected native of type binding.RuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//prepend: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//prepend: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.RuneList) + // * value - Go(rune) + // Result: + // * error + "Go(binding.RuneList)//remove": { + Doc: "binding.RuneList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//remove: arg 1: " + "expected native of type binding.RuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//remove: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//remove: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.RuneList) + // * 1 - Go(binding.DataListener) + "Go(binding.RuneList)//remove-listener": { + Doc: "binding.RuneList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//remove-listener: arg 1: " + "expected native of type binding.RuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.RuneList) + // * list - block[Go(rune)] + // Result: + // * error + "Go(binding.RuneList)//set": { + Doc: "binding.RuneList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//set: arg 1: " + "expected native of type binding.RuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []rune + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]rune, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//set: arg 2: " + "block item: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//set: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.RuneList) + // * index - integer + // * value - Go(rune) + // Result: + // * error + "Go(binding.RuneList)//set-value": { + Doc: "binding.RuneList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//set-value: arg 1: " + "expected native of type binding.RuneList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val rune + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//set-value: arg 3: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneList)//set-value: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.RuneTree) + // * 1 - Go(binding.DataListener) + "Go(binding.RuneTree)//add-listener": { + Doc: "binding.RuneTree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//add-listener: arg 1: " + "expected native of type binding.RuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.RuneTree) + // * parent - string + // * id - string + // * value - Go(rune) + // Result: + // * error + "Go(binding.RuneTree)//append": { + Doc: "binding.RuneTree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//append: arg 1: " + "expected native of type binding.RuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val rune + switch v := arg3.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//append: arg 4: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//append: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.RuneTree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.RuneTree)//child-i-ds": { + Doc: "binding.RuneTree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//child-i-ds: arg 1: " + "expected native of type binding.RuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.RuneTree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, Go(rune)] + // ] + // * error + "Go(binding.RuneTree)//get": { + Doc: "binding.RuneTree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//get: arg 1: " + "expected native of type binding.RuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + dVal = *env.NewNative(ps.Idx, mVal, "Go(rune)") + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.RuneTree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.RuneTree)//get-item": { + Doc: "binding.RuneTree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//get-item: arg 1: " + "expected native of type binding.RuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.RuneTree) + // * id - string + // Result: + // * Go(rune) + // * error + "Go(binding.RuneTree)//get-value": { + Doc: "binding.RuneTree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//get-value: arg 1: " + "expected native of type binding.RuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(rune)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.RuneTree) + // * parent - string + // * id - string + // * value - Go(rune) + // Result: + // * error + "Go(binding.RuneTree)//prepend": { + Doc: "binding.RuneTree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//prepend: arg 1: " + "expected native of type binding.RuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val rune + switch v := arg3.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//prepend: arg 4: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//prepend: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.RuneTree) + // * id - string + // Result: + // * error + "Go(binding.RuneTree)//remove": { + Doc: "binding.RuneTree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//remove: arg 1: " + "expected native of type binding.RuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.RuneTree) + // * 1 - Go(binding.DataListener) + "Go(binding.RuneTree)//remove-listener": { + Doc: "binding.RuneTree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//remove-listener: arg 1: " + "expected native of type binding.RuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.RuneTree) + // * ids - dict[string, block[string]] + // * values - dict[string, Go(rune)] + // Result: + // * error + "Go(binding.RuneTree)//set": { + Doc: "binding.RuneTree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 1: " + "expected native of type binding.RuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string]rune + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string]rune, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV rune + switch v := v.Series.S[i+1].(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 3: " + "map value: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 3: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string]rune, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV rune + switch v := dictV.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 3: " + "map value: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 3: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.RuneTree) + // * id - string + // * value - Go(rune) + // Result: + // * error + "Go(binding.RuneTree)//set-value": { + Doc: "binding.RuneTree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.RuneTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_RuneTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.RuneTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set-value: arg 1: " + "expected native of type binding.RuneTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val rune + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set-value: arg 3: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.RuneTree)//set-value: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.String) + // * 1 - Go(binding.DataListener) + "Go(binding.String)//add-listener": { + Doc: "binding.String.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.String + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//add-listener: arg 1: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.String)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.String)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.String) + // Result: + // * string + // * error + "Go(binding.String)//get": { + Doc: "binding.String.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.String + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//get: arg 1: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.String)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.String) + // * 1 - Go(binding.DataListener) + "Go(binding.String)//remove-listener": { + Doc: "binding.String.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.String + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//remove-listener: arg 1: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.String)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.String)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.String) + // * 1 - string + // Result: + // * error + "Go(binding.String)//set": { + Doc: "binding.String.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.String + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//set: arg 1: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.String)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.String)//set: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.StringList) + // * 1 - Go(binding.DataListener) + "Go(binding.StringList)//add-listener": { + Doc: "binding.StringList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//add-listener: arg 1: " + "expected native of type binding.StringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.StringList) + // * value - string + // Result: + // * error + "Go(binding.StringList)//append": { + Doc: "binding.StringList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//append: arg 1: " + "expected native of type binding.StringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.StringList) + // Result: + // * block[string] + // * error + "Go(binding.StringList)//get": { + Doc: "binding.StringList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//get: arg 1: " + "expected native of type binding.StringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.StringList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.StringList)//get-item": { + Doc: "binding.StringList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//get-item: arg 1: " + "expected native of type binding.StringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.StringList) + // * index - integer + // Result: + // * string + // * error + "Go(binding.StringList)//get-value": { + Doc: "binding.StringList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//get-value: arg 1: " + "expected native of type binding.StringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewString(res0) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.StringList) + // Result: + // * integer + "Go(binding.StringList)//length": { + Doc: "binding.StringList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//length: arg 1: " + "expected native of type binding.StringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.StringList) + // * value - string + // Result: + // * error + "Go(binding.StringList)//prepend": { + Doc: "binding.StringList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//prepend: arg 1: " + "expected native of type binding.StringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.StringList) + // * value - string + // Result: + // * error + "Go(binding.StringList)//remove": { + Doc: "binding.StringList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//remove: arg 1: " + "expected native of type binding.StringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.StringList) + // * 1 - Go(binding.DataListener) + "Go(binding.StringList)//remove-listener": { + Doc: "binding.StringList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//remove-listener: arg 1: " + "expected native of type binding.StringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.StringList) + // * list - block[string] + // Result: + // * error + "Go(binding.StringList)//set": { + Doc: "binding.StringList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//set: arg 1: " + "expected native of type binding.StringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []string + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//set: arg 2: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.StringList) + // * index - integer + // * value - string + // Result: + // * error + "Go(binding.StringList)//set-value": { + Doc: "binding.StringList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//set-value: arg 1: " + "expected native of type binding.StringList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringList)//set-value: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.StringTree) + // * 1 - Go(binding.DataListener) + "Go(binding.StringTree)//add-listener": { + Doc: "binding.StringTree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//add-listener: arg 1: " + "expected native of type binding.StringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.StringTree) + // * parent - string + // * id - string + // * value - string + // Result: + // * error + "Go(binding.StringTree)//append": { + Doc: "binding.StringTree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//append: arg 1: " + "expected native of type binding.StringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val string + if vc, ok := arg3.(env.String); ok { + arg3Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//append: arg 4: " + "expected string, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.StringTree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.StringTree)//child-i-ds": { + Doc: "binding.StringTree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//child-i-ds: arg 1: " + "expected native of type binding.StringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.StringTree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, string] + // ] + // * error + "Go(binding.StringTree)//get": { + Doc: "binding.StringTree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//get: arg 1: " + "expected native of type binding.StringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + dVal = *env.NewString(mVal) + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.StringTree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.StringTree)//get-item": { + Doc: "binding.StringTree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//get-item: arg 1: " + "expected native of type binding.StringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.StringTree) + // * id - string + // Result: + // * string + // * error + "Go(binding.StringTree)//get-value": { + Doc: "binding.StringTree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//get-value: arg 1: " + "expected native of type binding.StringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewString(res0) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.StringTree) + // * parent - string + // * id - string + // * value - string + // Result: + // * error + "Go(binding.StringTree)//prepend": { + Doc: "binding.StringTree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//prepend: arg 1: " + "expected native of type binding.StringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val string + if vc, ok := arg3.(env.String); ok { + arg3Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//prepend: arg 4: " + "expected string, but got " + objectDebugString(ps.Idx, arg3)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.StringTree) + // * id - string + // Result: + // * error + "Go(binding.StringTree)//remove": { + Doc: "binding.StringTree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//remove: arg 1: " + "expected native of type binding.StringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.StringTree) + // * 1 - Go(binding.DataListener) + "Go(binding.StringTree)//remove-listener": { + Doc: "binding.StringTree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//remove-listener: arg 1: " + "expected native of type binding.StringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.StringTree) + // * ids - dict[string, block[string]] + // * values - dict[string, string] + // Result: + // * error + "Go(binding.StringTree)//set": { + Doc: "binding.StringTree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 1: " + "expected native of type binding.StringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string]string + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV string + if vc, ok := v.Series.S[i+1].(env.String); ok { + mapV = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 3: " + "map value: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+1])) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV string + if vc, ok := dictV.(env.String); ok { + mapV = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 3: " + "map value: " + "expected string, but got " + objectDebugString(ps.Idx, dictV)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.StringTree) + // * id - string + // * value - string + // Result: + // * error + "Go(binding.StringTree)//set-value": { + Doc: "binding.StringTree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.StringTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_StringTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.StringTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set-value: arg 1: " + "expected native of type binding.StringTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.StringTree)//set-value: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Struct) + // * 1 - Go(binding.DataListener) + "Go(binding.Struct)//add-listener": { + Doc: "binding.Struct.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Struct + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Struct(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Struct); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//add-listener: arg 1: " + "expected native of type binding.Struct, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Struct) + // * 1 - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.Struct)//get-item": { + Doc: "binding.Struct.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Struct + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Struct(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Struct); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//get-item: arg 1: " + "expected native of type binding.Struct, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.Struct) + // * 1 - string + // Result: + // * Go(any) + // * error + "Go(binding.Struct)//get-value": { + Doc: "binding.Struct.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Struct + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Struct(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Struct); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//get-value: arg 1: " + "expected native of type binding.Struct, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(any)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.Struct) + // Result: + // * block[string] + "Go(binding.Struct)//keys": { + Doc: "binding.Struct.Keys", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Struct + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Struct(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//keys: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Struct); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//keys: arg 1: " + "expected native of type binding.Struct, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//keys: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//keys: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Keys() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.Struct) + // Result: + // * error + "Go(binding.Struct)//reload": { + Doc: "binding.Struct.Reload", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Struct + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Struct(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//reload: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Struct); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//reload: arg 1: " + "expected native of type binding.Struct, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//reload: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//reload: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Reload() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Struct) + // * 1 - Go(binding.DataListener) + "Go(binding.Struct)//remove-listener": { + Doc: "binding.Struct.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Struct + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Struct(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Struct); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//remove-listener: arg 1: " + "expected native of type binding.Struct, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Struct) + // * 1 - string + // * 2 - Go(any) + // Result: + // * error + "Go(binding.Struct)//set-value": { + Doc: "binding.Struct.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Struct + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Struct(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Struct); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//set-value: arg 1: " + "expected native of type binding.Struct, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val any + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//set-value: arg 3: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Struct)//set-value: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URI) + // * 1 - Go(binding.DataListener) + "Go(binding.URI)//add-listener": { + Doc: "binding.URI.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//add-listener: arg 1: " + "expected native of type binding.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URI) + // Result: + // * Go(fyne.URI) + // * error + "Go(binding.URI)//get": { + Doc: "binding.URI.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//get: arg 1: " + "expected native of type binding.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.URI) + // * 1 - Go(binding.DataListener) + "Go(binding.URI)//remove-listener": { + Doc: "binding.URI.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//remove-listener: arg 1: " + "expected native of type binding.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URI) + // * 1 - Go(fyne.URI) + // Result: + // * error + "Go(binding.URI)//set": { + Doc: "binding.URI.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//set: arg 1: " + "expected native of type binding.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//set: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//set: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URI)//set: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URIList) + // * 1 - Go(binding.DataListener) + "Go(binding.URIList)//add-listener": { + Doc: "binding.URIList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//add-listener: arg 1: " + "expected native of type binding.URIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URIList) + // * value - Go(fyne.URI) + // Result: + // * error + "Go(binding.URIList)//append": { + Doc: "binding.URIList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//append: arg 1: " + "expected native of type binding.URIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//append: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//append: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//append: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//append: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URIList) + // Result: + // * block[Go(fyne.URI)] + // * error + "Go(binding.URIList)//get": { + Doc: "binding.URIList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//get: arg 1: " + "expected native of type binding.URIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.URI)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.URIList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.URIList)//get-item": { + Doc: "binding.URIList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//get-item: arg 1: " + "expected native of type binding.URIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.URIList) + // * index - integer + // Result: + // * Go(fyne.URI) + // * error + "Go(binding.URIList)//get-value": { + Doc: "binding.URIList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//get-value: arg 1: " + "expected native of type binding.URIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.URIList) + // Result: + // * integer + "Go(binding.URIList)//length": { + Doc: "binding.URIList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//length: arg 1: " + "expected native of type binding.URIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.URIList) + // * value - Go(fyne.URI) + // Result: + // * error + "Go(binding.URIList)//prepend": { + Doc: "binding.URIList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//prepend: arg 1: " + "expected native of type binding.URIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//prepend: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//prepend: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//prepend: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//prepend: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URIList) + // * value - Go(fyne.URI) + // Result: + // * error + "Go(binding.URIList)//remove": { + Doc: "binding.URIList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove: arg 1: " + "expected native of type binding.URIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URIList) + // * 1 - Go(binding.DataListener) + "Go(binding.URIList)//remove-listener": { + Doc: "binding.URIList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove-listener: arg 1: " + "expected native of type binding.URIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URIList) + // * list - block[Go(fyne.URI)] + // Result: + // * error + "Go(binding.URIList)//set": { + Doc: "binding.URIList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set: arg 1: " + "expected native of type binding.URIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []fyne.URI + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]fyne.URI, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set: arg 2: " + "block item: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URIList) + // * index - integer + // * value - Go(fyne.URI) + // Result: + // * error + "Go(binding.URIList)//set-value": { + Doc: "binding.URIList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URIList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URIList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URIList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set-value: arg 1: " + "expected native of type binding.URIList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.URI + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set-value: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set-value: arg 3: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set-value: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URIList)//set-value: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URITree) + // * 1 - Go(binding.DataListener) + "Go(binding.URITree)//add-listener": { + Doc: "binding.URITree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//add-listener: arg 1: " + "expected native of type binding.URITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URITree) + // * parent - string + // * id - string + // * value - Go(fyne.URI) + // Result: + // * error + "Go(binding.URITree)//append": { + Doc: "binding.URITree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//append: arg 1: " + "expected native of type binding.URITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val fyne.URI + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//append: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//append: arg 4: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//append: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//append: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URITree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.URITree)//child-i-ds": { + Doc: "binding.URITree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//child-i-ds: arg 1: " + "expected native of type binding.URITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.URITree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, Go(fyne.URI)] + // ] + // * error + "Go(binding.URITree)//get": { + Doc: "binding.URITree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//get: arg 1: " + "expected native of type binding.URITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + dVal = ifaceToNative(ps.Idx, mVal, "Go(fyne.URI)") + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.URITree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.URITree)//get-item": { + Doc: "binding.URITree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//get-item: arg 1: " + "expected native of type binding.URITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.URITree) + // * id - string + // Result: + // * Go(fyne.URI) + // * error + "Go(binding.URITree)//get-value": { + Doc: "binding.URITree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//get-value: arg 1: " + "expected native of type binding.URITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.URITree) + // * parent - string + // * id - string + // * value - Go(fyne.URI) + // Result: + // * error + "Go(binding.URITree)//prepend": { + Doc: "binding.URITree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//prepend: arg 1: " + "expected native of type binding.URITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val fyne.URI + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//prepend: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//prepend: arg 4: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//prepend: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//prepend: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URITree) + // * id - string + // Result: + // * error + "Go(binding.URITree)//remove": { + Doc: "binding.URITree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//remove: arg 1: " + "expected native of type binding.URITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URITree) + // * 1 - Go(binding.DataListener) + "Go(binding.URITree)//remove-listener": { + Doc: "binding.URITree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//remove-listener: arg 1: " + "expected native of type binding.URITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URITree) + // * ids - dict[string, block[string]] + // * values - dict[string, Go(fyne.URI)] + // Result: + // * error + "Go(binding.URITree)//set": { + Doc: "binding.URITree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 1: " + "expected native of type binding.URITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string]fyne.URI + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string]fyne.URI, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV fyne.URI + switch v := v.Series.S[i+1].(type) { + case env.RyeCtx: + var err error + mapV, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 3: " + "map value: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 3: " + "map value: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 3: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 3: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string]fyne.URI, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV fyne.URI + switch v := dictV.(type) { + case env.RyeCtx: + var err error + mapV, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 3: " + "map value: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 3: " + "map value: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 3: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 3: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.URITree) + // * id - string + // * value - Go(fyne.URI) + // Result: + // * error + "Go(binding.URITree)//set-value": { + Doc: "binding.URITree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URITree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URITree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URITree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set-value: arg 1: " + "expected native of type binding.URITree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.URI + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set-value: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set-value: arg 3: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set-value: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.URITree)//set-value: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Untyped) + // * 1 - Go(binding.DataListener) + "Go(binding.Untyped)//add-listener": { + Doc: "binding.Untyped.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Untyped + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Untyped(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Untyped); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//add-listener: arg 1: " + "expected native of type binding.Untyped, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Untyped) + // Result: + // * Go(any) + // * error + "Go(binding.Untyped)//get": { + Doc: "binding.Untyped.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Untyped + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Untyped(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Untyped); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//get: arg 1: " + "expected native of type binding.Untyped, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(any)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.Untyped) + // * 1 - Go(binding.DataListener) + "Go(binding.Untyped)//remove-listener": { + Doc: "binding.Untyped.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Untyped + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Untyped(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Untyped); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//remove-listener: arg 1: " + "expected native of type binding.Untyped, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.Untyped) + // * 1 - Go(any) + // Result: + // * error + "Go(binding.Untyped)//set": { + Doc: "binding.Untyped.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Untyped + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Untyped(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Untyped); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//set: arg 1: " + "expected native of type binding.Untyped, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val any + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//set: arg 2: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.Untyped)//set: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedList) + // * 1 - Go(binding.DataListener) + "Go(binding.UntypedList)//add-listener": { + Doc: "binding.UntypedList.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//add-listener: arg 1: " + "expected native of type binding.UntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedList) + // * value - Go(any) + // Result: + // * error + "Go(binding.UntypedList)//append": { + Doc: "binding.UntypedList.Append", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//append: arg 1: " + "expected native of type binding.UntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val any + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//append: arg 2: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//append: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedList) + // Result: + // * block[Go(any)] + // * error + "Go(binding.UntypedList)//get": { + Doc: "binding.UntypedList.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//get: arg 1: " + "expected native of type binding.UntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewNative(ps.Idx, it, "Go(any)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.UntypedList) + // * index - integer + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.UntypedList)//get-item": { + Doc: "binding.UntypedList.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//get-item: arg 1: " + "expected native of type binding.UntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//get-item: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.UntypedList) + // * index - integer + // Result: + // * Go(any) + // * error + "Go(binding.UntypedList)//get-value": { + Doc: "binding.UntypedList.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//get-value: arg 1: " + "expected native of type binding.UntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//get-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(any)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.UntypedList) + // Result: + // * integer + "Go(binding.UntypedList)//length": { + Doc: "binding.UntypedList.Length", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//length: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//length: arg 1: " + "expected native of type binding.UntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//length: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//length: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Length() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.UntypedList) + // * value - Go(any) + // Result: + // * error + "Go(binding.UntypedList)//prepend": { + Doc: "binding.UntypedList.Prepend", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//prepend: arg 1: " + "expected native of type binding.UntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val any + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//prepend: arg 2: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//prepend: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedList) + // * value - Go(any) + // Result: + // * error + "Go(binding.UntypedList)//remove": { + Doc: "binding.UntypedList.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//remove: arg 1: " + "expected native of type binding.UntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val any + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//remove: arg 2: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//remove: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedList) + // * 1 - Go(binding.DataListener) + "Go(binding.UntypedList)//remove-listener": { + Doc: "binding.UntypedList.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//remove-listener: arg 1: " + "expected native of type binding.UntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedList) + // * list - block[Go(any)] + // Result: + // * error + "Go(binding.UntypedList)//set": { + Doc: "binding.UntypedList.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//set: arg 1: " + "expected native of type binding.UntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []any + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]any, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//set: arg 2: " + "block item: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//set: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//set: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedList) + // * index - integer + // * value - Go(any) + // Result: + // * error + "Go(binding.UntypedList)//set-value": { + Doc: "binding.UntypedList.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//set-value: arg 1: " + "expected native of type binding.UntypedList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//set-value: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val any + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//set-value: arg 3: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedList)//set-value: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedMap) + // * 1 - Go(binding.DataListener) + "Go(binding.UntypedMap)//add-listener": { + Doc: "binding.UntypedMap.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//add-listener: arg 1: " + "expected native of type binding.UntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedMap) + // * 1 - string + "Go(binding.UntypedMap)//delete": { + Doc: "binding.UntypedMap.Delete", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//delete: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//delete: arg 1: " + "expected native of type binding.UntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//delete: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//delete: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//delete: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.Delete(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedMap) + // Result: + // * dict[string, Go(any)] + // * error + "Go(binding.UntypedMap)//get": { + Doc: "binding.UntypedMap.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//get: arg 1: " + "expected native of type binding.UntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + dVal = *env.NewNative(ps.Idx, mVal, "Go(any)") + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.UntypedMap) + // * 1 - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.UntypedMap)//get-item": { + Doc: "binding.UntypedMap.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//get-item: arg 1: " + "expected native of type binding.UntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.UntypedMap) + // * 1 - string + // Result: + // * Go(any) + // * error + "Go(binding.UntypedMap)//get-value": { + Doc: "binding.UntypedMap.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//get-value: arg 1: " + "expected native of type binding.UntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(any)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.UntypedMap) + // Result: + // * block[string] + "Go(binding.UntypedMap)//keys": { + Doc: "binding.UntypedMap.Keys", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//keys: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//keys: arg 1: " + "expected native of type binding.UntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//keys: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//keys: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Keys() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.UntypedMap) + // * 1 - Go(binding.DataListener) + "Go(binding.UntypedMap)//remove-listener": { + Doc: "binding.UntypedMap.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//remove-listener: arg 1: " + "expected native of type binding.UntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedMap) + // * 1 - dict[string, Go(any)] + // Result: + // * error + "Go(binding.UntypedMap)//set": { + Doc: "binding.UntypedMap.Set", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set: arg 1: " + "expected native of type binding.UntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string]any + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string]any, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV any + switch v := v.Series.S[i+1].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set: arg 2: " + "map value: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set: arg 2: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string]any, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV any + switch v := dictV.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set: arg 2: " + "map value: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set: arg 2: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedMap) + // * 1 - string + // * 2 - Go(any) + // Result: + // * error + "Go(binding.UntypedMap)//set-value": { + Doc: "binding.UntypedMap.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedMap + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedMap(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedMap); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set-value: arg 1: " + "expected native of type binding.UntypedMap, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val any + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set-value: arg 3: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedMap)//set-value: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedTree) + // * 1 - Go(binding.DataListener) + "Go(binding.UntypedTree)//add-listener": { + Doc: "binding.UntypedTree.AddListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//add-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//add-listener: arg 1: " + "expected native of type binding.UntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//add-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//add-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//add-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//add-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//add-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//add-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.AddListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedTree) + // * parent - string + // * id - string + // * value - Go(any) + // Result: + // * error + "Go(binding.UntypedTree)//append": { + Doc: "binding.UntypedTree.Append", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//append: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//append: arg 1: " + "expected native of type binding.UntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//append: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//append: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//append: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//append: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val any + switch v := arg3.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//append: arg 4: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//append: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Append(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedTree) + // * 1 - string + // Result: + // * block[string] + "Go(binding.UntypedTree)//child-i-ds": { + Doc: "binding.UntypedTree.ChildIDs", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//child-i-ds: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//child-i-ds: arg 1: " + "expected native of type binding.UntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//child-i-ds: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//child-i-ds: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//child-i-ds: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.ChildIDs(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.UntypedTree) + // Result: + // [ + // dict[string, block[string]] + // dict[string, Go(any)] + // ] + // * error + "Go(binding.UntypedTree)//get": { + Doc: "binding.UntypedTree.Get", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//get: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//get: arg 1: " + "expected native of type binding.UntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//get: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//get: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, resErr := arg0Val.Get() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + { + items := make([]env.Object, len(mVal)) + for i, it := range mVal { + items[i] = *env.NewString(it) + } + dVal = *env.NewBlock(*env.NewTSeries(items)) + } + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + var res1Obj env.Object + { + data := make(map[string]any, len(res1)) + for mKey, mVal := range res1 { + var dVal env.Object + dVal = *env.NewNative(ps.Idx, mVal, "Go(any)") + data[mKey] = dVal + } + res1Obj = *env.NewDict(data) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(binding.UntypedTree) + // * id - string + // Result: + // * Go(binding.DataItem) + // * error + "Go(binding.UntypedTree)//get-item": { + Doc: "binding.UntypedTree.GetItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//get-item: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//get-item: arg 1: " + "expected native of type binding.UntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//get-item: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//get-item: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//get-item: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetItem(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataItem)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.UntypedTree) + // * id - string + // Result: + // * Go(any) + // * error + "Go(binding.UntypedTree)//get-value": { + Doc: "binding.UntypedTree.GetValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//get-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//get-value: arg 1: " + "expected native of type binding.UntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//get-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//get-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//get-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.GetValue(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(any)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(binding.UntypedTree) + // * parent - string + // * id - string + // * value - Go(any) + // Result: + // * error + "Go(binding.UntypedTree)//prepend": { + Doc: "binding.UntypedTree.Prepend", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//prepend: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//prepend: arg 1: " + "expected native of type binding.UntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//prepend: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//prepend: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//prepend: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//prepend: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val any + switch v := arg3.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//prepend: arg 4: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//prepend: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Prepend(arg1Val, arg2Val, arg3Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedTree) + // * id - string + // Result: + // * error + "Go(binding.UntypedTree)//remove": { + Doc: "binding.UntypedTree.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//remove: arg 1: " + "expected native of type binding.UntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedTree) + // * 1 - Go(binding.DataListener) + "Go(binding.UntypedTree)//remove-listener": { + Doc: "binding.UntypedTree.RemoveListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//remove-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//remove-listener: arg 1: " + "expected native of type binding.UntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//remove-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//remove-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val binding.DataListener + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_DataListener(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//remove-listener: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataListener); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//remove-listener: arg 2: " + "expected native of type binding.DataListener, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//remove-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//remove-listener: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedTree) + // * ids - dict[string, block[string]] + // * values - dict[string, Go(any)] + // Result: + // * error + "Go(binding.UntypedTree)//set": { + Doc: "binding.UntypedTree.Set", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 1: " + "expected native of type binding.UntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val map[string][]string + switch v := arg1.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 2: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg1Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 2: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Dict: + arg1Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 2: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 2: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 2: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg1Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 2: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val map[string]any + switch v := arg2.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 3: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg2Val = make(map[string]any, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 3: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV any + switch v := v.Series.S[i+1].(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 3: " + "map value: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 3: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Dict: + arg2Val = make(map[string]any, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV any + switch v := dictV.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + mapV = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 3: " + "map value: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 3: " + "map value: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg2Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set: arg 3: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Set(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(binding.UntypedTree) + // * id - string + // * value - Go(any) + // Result: + // * error + "Go(binding.UntypedTree)//set-value": { + Doc: "binding.UntypedTree.SetValue", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.UntypedTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_UntypedTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.UntypedTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set-value: arg 1: " + "expected native of type binding.UntypedTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val any + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set-value: arg 3: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(binding.UntypedTree)//set-value: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.SetValue(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(desktop.App) + // * icon - Go(fyne.Resource) + "Go(desktop.App)//set-system-tray-icon": { + Doc: "desktop.App.SetSystemTrayIcon", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.App)//set-system-tray-icon: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.App)//set-system-tray-icon: arg 1: " + "expected native of type desktop.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.App)//set-system-tray-icon: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.App)//set-system-tray-icon: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.App)//set-system-tray-icon: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.App)//set-system-tray-icon: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.App)//set-system-tray-icon: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.App)//set-system-tray-icon: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetSystemTrayIcon(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(desktop.App) + // * menu - Go(*fyne.Menu) + "Go(desktop.App)//set-system-tray-menu": { + Doc: "desktop.App.SetSystemTrayMenu", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.App)//set-system-tray-menu: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.App)//set-system-tray-menu: arg 1: " + "expected native of type desktop.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.App)//set-system-tray-menu: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.App)//set-system-tray-menu: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.Menu + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Menu); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.App)//set-system-tray-menu: arg 2: " + "expected native of type *fyne.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.App)//set-system-tray-menu: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.App)//set-system-tray-menu: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetSystemTrayMenu(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(desktop.Canvas) + // Result: + // * fn { Go(*fyne.KeyEvent) } + "Go(desktop.Canvas)//on-key-down": { + Doc: "desktop.Canvas.OnKeyDown", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//on-key-down: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//on-key-down: arg 1: " + "expected native of type desktop.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//on-key-down: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//on-key-down: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.OnKeyDown() + var res0Obj env.Object + res0Obj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.KeyEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//on-key-down: arg 1: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//on-key-down: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//on-key-down: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0(arg0Val) + return nil + }, 1, false, false, "Returned func") + return res0Obj + }, + }, + // Args: + // * recv - Go(desktop.Canvas) + // Result: + // * fn { Go(*fyne.KeyEvent) } + "Go(desktop.Canvas)//on-key-up": { + Doc: "desktop.Canvas.OnKeyUp", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//on-key-up: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//on-key-up: arg 1: " + "expected native of type desktop.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//on-key-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//on-key-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.OnKeyUp() + var res0Obj env.Object + res0Obj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.KeyEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//on-key-up: arg 1: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//on-key-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//on-key-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0(arg0Val) + return nil + }, 1, false, false, "Returned func") + return res0Obj + }, + }, + // Args: + // * recv - Go(desktop.Canvas) + // * 1 - fn { Go(*fyne.KeyEvent) } + "Go(desktop.Canvas)//set-on-key-down": { + Doc: "desktop.Canvas.SetOnKeyDown", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//set-on-key-down: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//set-on-key-down: arg 1: " + "expected native of type desktop.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//set-on-key-down: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//set-on-key-down: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(*fyne.KeyEvent) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//set-on-key-down: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 *fyne.KeyEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.KeyEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//set-on-key-down: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//set-on-key-down: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnKeyDown(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(desktop.Canvas) + // * 1 - fn { Go(*fyne.KeyEvent) } + "Go(desktop.Canvas)//set-on-key-up": { + Doc: "desktop.Canvas.SetOnKeyUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//set-on-key-up: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//set-on-key-up: arg 1: " + "expected native of type desktop.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//set-on-key-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//set-on-key-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(*fyne.KeyEvent) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//set-on-key-up: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 *fyne.KeyEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.KeyEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//set-on-key-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Canvas)//set-on-key-up: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnKeyUp(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(desktop.Cursor) + // Result: + // [ + // Go(image.image) + // integer + // integer + // ] + "Go(desktop.Cursor)//image": { + Doc: "desktop.Cursor.Image", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Cursor + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Cursor(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Cursor)//image: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Cursor); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Cursor)//image: arg 1: " + "expected native of type desktop.Cursor, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Cursor)//image: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Cursor)//image: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1, res2 := arg0Val.Image() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(image.Image)") + var res1Obj env.Object + res1Obj = *env.NewInteger(int64(res1)) + var res2Obj env.Object + res2Obj = *env.NewInteger(int64(res2)) + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + res2Obj, + })) + }, + }, + // Args: + // * recv - Go(desktop.cursorable) + // Result: + // * Go(desktop.cursor) + "Go(desktop.Cursorable)//cursor": { + Doc: "desktop.Cursorable.Cursor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Cursorable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Cursorable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Cursorable)//cursor: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Cursorable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Cursorable)//cursor: arg 1: " + "expected native of type desktop.Cursorable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Cursorable)//cursor: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Cursorable)//cursor: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Cursor() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(desktop.Cursor)") + return res0Obj + }, + }, + // Args: + // * recv - Go(desktop.Driver) + // Result: + // * Go(fyne.Window) + "Go(desktop.Driver)//create-splash-window": { + Doc: "desktop.Driver.CreateSplashWindow", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Driver + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Driver)//create-splash-window: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Driver); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Driver)//create-splash-window: arg 1: " + "expected native of type desktop.Driver, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Driver)//create-splash-window: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Driver)//create-splash-window: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateSplashWindow() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Window)") + return res0Obj + }, + }, + // Args: + // * recv - Go(desktop.Driver) + // Result: + // * integer + "Go(desktop.Driver)//current-key-modifiers": { + Doc: "desktop.Driver.CurrentKeyModifiers", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Driver + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Driver)//current-key-modifiers: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Driver); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Driver)//current-key-modifiers: arg 1: " + "expected native of type desktop.Driver, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Driver)//current-key-modifiers: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Driver)//current-key-modifiers: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CurrentKeyModifiers() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(int(res0))) + return res0Obj + }, + }, + // Args: + // * recv - Go(desktop.Hoverable) + // * 1 - Go(*desktop.MouseEvent) + "Go(desktop.Hoverable)//mouse-in": { + Doc: "desktop.Hoverable.MouseIn", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Hoverable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Hoverable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-in: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Hoverable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-in: arg 1: " + "expected native of type desktop.Hoverable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-in: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-in: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-in: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-in: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-in: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseIn(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(desktop.Hoverable) + // * 1 - Go(*desktop.MouseEvent) + "Go(desktop.Hoverable)//mouse-moved": { + Doc: "desktop.Hoverable.MouseMoved", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Hoverable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Hoverable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-moved: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Hoverable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-moved: arg 1: " + "expected native of type desktop.Hoverable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-moved: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-moved: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-moved: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-moved: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-moved: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseMoved(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(desktop.Hoverable) + "Go(desktop.Hoverable)//mouse-out": { + Doc: "desktop.Hoverable.MouseOut", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Hoverable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Hoverable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-out: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Hoverable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-out: arg 1: " + "expected native of type desktop.Hoverable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-out: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Hoverable)//mouse-out: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseOut() + return arg0 + }, + }, + // Args: + // * recv - Go(desktop.Keyable) + "Go(desktop.Keyable)//focus-gained": { + Doc: "desktop.Keyable.FocusGained", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Keyable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Keyable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//focus-gained: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Keyable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//focus-gained: arg 1: " + "expected native of type desktop.Keyable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//focus-gained: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//focus-gained: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusGained() + return arg0 + }, + }, + // Args: + // * recv - Go(desktop.Keyable) + "Go(desktop.Keyable)//focus-lost": { + Doc: "desktop.Keyable.FocusLost", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Keyable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Keyable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//focus-lost: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Keyable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//focus-lost: arg 1: " + "expected native of type desktop.Keyable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//focus-lost: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//focus-lost: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusLost() + return arg0 + }, + }, + // Args: + // * recv - Go(desktop.Keyable) + // * 1 - Go(*fyne.KeyEvent) + "Go(desktop.Keyable)//key-down": { + Doc: "desktop.Keyable.KeyDown", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Keyable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Keyable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//key-down: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Keyable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//key-down: arg 1: " + "expected native of type desktop.Keyable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//key-down: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//key-down: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//key-down: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//key-down: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//key-down: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.KeyDown(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(desktop.Keyable) + // * 1 - Go(*fyne.KeyEvent) + "Go(desktop.Keyable)//key-up": { + Doc: "desktop.Keyable.KeyUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Keyable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Keyable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//key-up: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Keyable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//key-up: arg 1: " + "expected native of type desktop.Keyable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//key-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//key-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//key-up: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//key-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//key-up: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.KeyUp(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(desktop.Keyable) + // * 1 - Go(*fyne.KeyEvent) + "Go(desktop.Keyable)//typed-key": { + Doc: "desktop.Keyable.TypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Keyable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Keyable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//typed-key: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Keyable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//typed-key: arg 1: " + "expected native of type desktop.Keyable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//typed-key: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//typed-key: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedKey(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(desktop.Keyable) + // * 1 - Go(rune) + "Go(desktop.Keyable)//typed-rune": { + Doc: "desktop.Keyable.TypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Keyable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Keyable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//typed-rune: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Keyable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//typed-rune: arg 1: " + "expected native of type desktop.Keyable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//typed-rune: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Keyable)//typed-rune: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedRune(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(desktop.Mouseable) + // * 1 - Go(*desktop.MouseEvent) + "Go(desktop.Mouseable)//mouse-down": { + Doc: "desktop.Mouseable.MouseDown", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Mouseable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Mouseable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Mouseable)//mouse-down: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Mouseable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Mouseable)//mouse-down: arg 1: " + "expected native of type desktop.Mouseable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Mouseable)//mouse-down: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Mouseable)//mouse-down: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Mouseable)//mouse-down: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Mouseable)//mouse-down: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Mouseable)//mouse-down: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseDown(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(desktop.Mouseable) + // * 1 - Go(*desktop.MouseEvent) + "Go(desktop.Mouseable)//mouse-up": { + Doc: "desktop.Mouseable.MouseUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.Mouseable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_desktop_Mouseable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(desktop.Mouseable)//mouse-up: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(desktop.Mouseable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Mouseable)//mouse-up: arg 1: " + "expected native of type desktop.Mouseable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Mouseable)//mouse-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Mouseable)//mouse-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *desktop.MouseEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*desktop.MouseEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.Mouseable)//mouse-up: arg 2: " + "expected native of type *desktop.MouseEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(desktop.Mouseable)//mouse-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(desktop.Mouseable)//mouse-up: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.MouseUp(arg1Val) + return arg0 + }, + }, + // image is not used for any of the StandardCursor types. + // + // Since: 2.0 + // + // Args: + // * recv - Go(desktop.StandardCursor) + // Result: + // [ + // Go(image.image) + // integer + // integer + // ] + "Go(desktop.StandardCursor)//image": { + Doc: "desktop.StandardCursor.Image", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val desktop.StandardCursor + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal desktop.StandardCursor + if natOk { + natVal, natValOk = nat.Value.(desktop.StandardCursor) + } + if natValOk { + arg0Val = natVal + } else { + var u int + if vc, ok := arg0.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(desktop.StandardCursor)//image: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = desktop.StandardCursor(u) + } + } + res0, res1, res2 := arg0Val.Image() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(image.Image)") + var res1Obj env.Object + res1Obj = *env.NewInteger(int64(res1)) + var res2Obj env.Object + res2Obj = *env.NewInteger(int64(res2)) + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + res2Obj, + })) + }, + }, + // Args: + // * recv - Go(dialog.Dialog) + "Go(dialog.Dialog)//hide": { + Doc: "dialog.Dialog.Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val dialog.Dialog + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_dialog_Dialog(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//hide: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(dialog.Dialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//hide: arg 1: " + "expected native of type dialog.Dialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * recv - Go(dialog.Dialog) + // Result: + // * Go(fyne.Size) + "Go(dialog.Dialog)//min-size": { + Doc: "dialog.Dialog.MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val dialog.Dialog + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_dialog_Dialog(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//min-size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(dialog.Dialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//min-size: arg 1: " + "expected native of type dialog.Dialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(dialog.Dialog) + "Go(dialog.Dialog)//refresh": { + Doc: "dialog.Dialog.Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val dialog.Dialog + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_dialog_Dialog(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//refresh: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(dialog.Dialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//refresh: arg 1: " + "expected native of type dialog.Dialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(dialog.Dialog) + // * size - Go(fyne.Size) + "Go(dialog.Dialog)//resize": { + Doc: "dialog.Dialog.Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val dialog.Dialog + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_dialog_Dialog(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//resize: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(dialog.Dialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//resize: arg 1: " + "expected native of type dialog.Dialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(dialog.Dialog) + // * label - string + "Go(dialog.Dialog)//set-dismiss-text": { + Doc: "dialog.Dialog.SetDismissText", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val dialog.Dialog + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_dialog_Dialog(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//set-dismiss-text: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(dialog.Dialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//set-dismiss-text: arg 1: " + "expected native of type dialog.Dialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//set-dismiss-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//set-dismiss-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//set-dismiss-text: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetDismissText(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(dialog.Dialog) + // * closed - fn { } + "Go(dialog.Dialog)//set-on-closed": { + Doc: "dialog.Dialog.SetOnClosed", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val dialog.Dialog + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_dialog_Dialog(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//set-on-closed: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(dialog.Dialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//set-on-closed: arg 1: " + "expected native of type dialog.Dialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//set-on-closed: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//set-on-closed: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//set-on-closed: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//set-on-closed: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//set-on-closed: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnClosed(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(dialog.Dialog) + "Go(dialog.Dialog)//show": { + Doc: "dialog.Dialog.Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val dialog.Dialog + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_dialog_Dialog(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//show: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(dialog.Dialog); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//show: arg 1: " + "expected native of type dialog.Dialog, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(dialog.Dialog)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.App) + // Result: + // * Go(fyne.cloud-provider) + "Go(fyne.App)//cloud-provider": { + Doc: "fyne.App.CloudProvider", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//cloud-provider: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//cloud-provider: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//cloud-provider: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//cloud-provider: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CloudProvider() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CloudProvider)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.App) + // Result: + // * Go(fyne.driver) + "Go(fyne.App)//driver": { + Doc: "fyne.App.Driver", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//driver: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//driver: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//driver: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//driver: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Driver() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Driver)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.App) + // Result: + // * Go(fyne.Resource) + "Go(fyne.App)//icon": { + Doc: "fyne.App.Icon", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//icon: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//icon: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//icon: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//icon: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Icon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.App) + // Result: + // * Go(fyne.lifecycle) + "Go(fyne.App)//lifecycle": { + Doc: "fyne.App.Lifecycle", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//lifecycle: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//lifecycle: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//lifecycle: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//lifecycle: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Lifecycle() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Lifecycle)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.App) + // Result: + // * Go(fyne.Appmetadata) + "Go(fyne.App)//metadata": { + Doc: "fyne.App.Metadata", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//metadata: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//metadata: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//metadata: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//metadata: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Metadata() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.AppMetadata)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.App) + // * title - string + // Result: + // * Go(fyne.Window) + "Go(fyne.App)//window": { + Doc: "fyne.App.NewWindow", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//window: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//window: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//window: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//window: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//window: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.NewWindow(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Window)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.App) + // * url - *Go(url.URL) + // Result: + // * error + "Go(fyne.App)//open-url": { + Doc: "fyne.App.OpenURL", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//open-url: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//open-url: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//open-url: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//open-url: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *url.URL + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*url.URL); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//open-url: arg 2: " + "expected native of type *url.URL, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//open-url: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//open-url: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.OpenURL(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.App) + // Result: + // * Go(fyne.preferences) + "Go(fyne.App)//preferences": { + Doc: "fyne.App.Preferences", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//preferences: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//preferences: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//preferences: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//preferences: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Preferences() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Preferences)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.App) + "Go(fyne.App)//quit": { + Doc: "fyne.App.Quit", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//quit: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//quit: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//quit: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//quit: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Quit() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.App) + "Go(fyne.App)//run": { + Doc: "fyne.App.Run", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//run: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//run: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//run: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//run: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Run() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.App) + // * 1 - Go(*fyne.Notification) + "Go(fyne.App)//send-notification": { + Doc: "fyne.App.SendNotification", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//send-notification: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//send-notification: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//send-notification: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//send-notification: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.Notification + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Notification); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//send-notification: arg 2: " + "expected native of type *fyne.Notification, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//send-notification: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//send-notification: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SendNotification(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.App) + // * 1 - Go(fyne.CloudProvider) + "Go(fyne.App)//set-cloud-provider": { + Doc: "fyne.App.SetCloudProvider", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-cloud-provider: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-cloud-provider: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-cloud-provider: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-cloud-provider: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CloudProvider + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CloudProvider(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-cloud-provider: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CloudProvider); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-cloud-provider: arg 2: " + "expected native of type fyne.CloudProvider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-cloud-provider: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-cloud-provider: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetCloudProvider(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.App) + // * 1 - Go(fyne.Resource) + "Go(fyne.App)//set-icon": { + Doc: "fyne.App.SetIcon", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-icon: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-icon: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-icon: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-icon: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-icon: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-icon: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-icon: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//set-icon: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetIcon(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.App) + // Result: + // * Go(fyne.settings) + "Go(fyne.App)//settings": { + Doc: "fyne.App.Settings", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//settings: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//settings: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//settings: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//settings: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Settings() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Settings)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.App) + // Result: + // * Go(fyne.storage) + "Go(fyne.App)//storage": { + Doc: "fyne.App.Storage", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//storage: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//storage: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//storage: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//storage: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Storage() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Storage)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.App) + // Result: + // * string + "Go(fyne.App)//unique-id": { + Doc: "fyne.App.UniqueID", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//unique-id: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//unique-id: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//unique-id: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.App)//unique-id: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.UniqueID() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // * shortcut - Go(fyne.Shortcut) + // * handler - fn { Go(fyne.Shortcut) } + "Go(fyne.Canvas)//add-shortcut": { + Doc: "fyne.Canvas.AddShortcut", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//add-shortcut: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//add-shortcut: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//add-shortcut: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//add-shortcut: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Shortcut + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Shortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//add-shortcut: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Shortcut); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//add-shortcut: arg 2: " + "expected native of type fyne.Shortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//add-shortcut: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//add-shortcut: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val func(fyne.Shortcut) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//add-shortcut: arg 3: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 fyne.Shortcut) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Shortcut)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//add-shortcut: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//add-shortcut: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.AddShortcut(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // Result: + // * Go(image.Image) + "Go(fyne.Canvas)//capture": { + Doc: "fyne.Canvas.Capture", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//capture: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//capture: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//capture: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//capture: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Capture() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(image.Image)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // Result: + // * Go(fyne.CanvasObject) + "Go(fyne.Canvas)//content": { + Doc: "fyne.Canvas.Content", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//content: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//content: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Content() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // * 1 - Go(fyne.focusable) + "Go(fyne.Canvas)//focus": { + Doc: "fyne.Canvas.Focus", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Focusable + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Focusable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Focusable); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus: arg 2: " + "expected native of type fyne.Focusable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Focus(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + "Go(fyne.Canvas)//focus-next": { + Doc: "fyne.Canvas.FocusNext", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus-next: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus-next: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus-next: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus-next: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusNext() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + "Go(fyne.Canvas)//focus-previous": { + Doc: "fyne.Canvas.FocusPrevious", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus-previous: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus-previous: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus-previous: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focus-previous: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusPrevious() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // Result: + // * Go(fyne.Focusable) + "Go(fyne.Canvas)//focused": { + Doc: "fyne.Canvas.Focused", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focused: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focused: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focused: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//focused: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Focused() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Focusable)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // Result: + // [ + // Go(fyne.Position) + // Go(fyne.Size) + // ] + "Go(fyne.Canvas)//interactive-area": { + Doc: "fyne.Canvas.InteractiveArea", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//interactive-area: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//interactive-area: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//interactive-area: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//interactive-area: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1 := arg0Val.InteractiveArea() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + var res1Obj env.Object + res1Obj = *env.NewNative(ps.Idx, &res1, "Go(*fyne.Size)") + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // Result: + // * fn { Go(*fyne.KeyEvent) } + "Go(fyne.Canvas)//on-typed-key": { + Doc: "fyne.Canvas.OnTypedKey", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//on-typed-key: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//on-typed-key: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//on-typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//on-typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.OnTypedKey() + var res0Obj env.Object + res0Obj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.KeyEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//on-typed-key: arg 1: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//on-typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//on-typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0(arg0Val) + return nil + }, 1, false, false, "Returned func") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // Result: + // * fn { Go(rune) } + "Go(fyne.Canvas)//on-typed-rune": { + Doc: "fyne.Canvas.OnTypedRune", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//on-typed-rune: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//on-typed-rune: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//on-typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//on-typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.OnTypedRune() + var res0Obj env.Object + res0Obj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val rune + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//on-typed-rune: arg 1: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//on-typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0(arg0Val) + return nil + }, 1, false, false, "Returned func") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // Result: + // * Go(fyne.OverlayStack) + "Go(fyne.Canvas)//overlays": { + Doc: "fyne.Canvas.Overlays", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//overlays: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//overlays: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//overlays: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//overlays: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Overlays() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.OverlayStack)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // * 1 - Go(fyne.Position) + // Result: + // [ + // integer + // integer + // ] + "Go(fyne.Canvas)//pixel-coordinate-for-position": { + Doc: "fyne.Canvas.PixelCoordinateForPosition", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//pixel-coordinate-for-position: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//pixel-coordinate-for-position: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//pixel-coordinate-for-position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//pixel-coordinate-for-position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//pixel-coordinate-for-position: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//pixel-coordinate-for-position: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1 := arg0Val.PixelCoordinateForPosition(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + var res1Obj env.Object + res1Obj = *env.NewInteger(int64(res1)) + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // * 1 - Go(fyne.CanvasObject) + "Go(fyne.Canvas)//refresh": { + Doc: "fyne.Canvas.Refresh", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//refresh: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//refresh: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//refresh: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//refresh: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//refresh: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//refresh: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // * shortcut - Go(fyne.Shortcut) + "Go(fyne.Canvas)//remove-shortcut": { + Doc: "fyne.Canvas.RemoveShortcut", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//remove-shortcut: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//remove-shortcut: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//remove-shortcut: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//remove-shortcut: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Shortcut + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Shortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//remove-shortcut: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Shortcut); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//remove-shortcut: arg 2: " + "expected native of type fyne.Shortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//remove-shortcut: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//remove-shortcut: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveShortcut(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // Result: + // * decimal + "Go(fyne.Canvas)//scale": { + Doc: "fyne.Canvas.Scale", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//scale: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//scale: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//scale: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//scale: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Scale() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // * 1 - Go(fyne.CanvasObject) + "Go(fyne.Canvas)//set-content": { + Doc: "fyne.Canvas.SetContent", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-content: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-content: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-content: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-content: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-content: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-content: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetContent(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // * 1 - fn { Go(*fyne.KeyEvent) } + "Go(fyne.Canvas)//set-on-typed-key": { + Doc: "fyne.Canvas.SetOnTypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-on-typed-key: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-on-typed-key: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-on-typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-on-typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(*fyne.KeyEvent) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-on-typed-key: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 *fyne.KeyEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.KeyEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-on-typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-on-typed-key: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnTypedKey(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // * 1 - fn { Go(rune) } + "Go(fyne.Canvas)//set-on-typed-rune": { + Doc: "fyne.Canvas.SetOnTypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-on-typed-rune: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-on-typed-rune: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-on-typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-on-typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(rune) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-on-typed-rune: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 rune) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-on-typed-rune: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//set-on-typed-rune: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnTypedRune(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + // Result: + // * Go(fyne.size) + "Go(fyne.Canvas)//size": { + Doc: "fyne.Canvas.Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//size: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Canvas) + "Go(fyne.Canvas)//unfocus": { + Doc: "fyne.Canvas.Unfocus", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//unfocus: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//unfocus: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//unfocus: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Canvas)//unfocus: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unfocus() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.CanvasObject) + "Go(fyne.CanvasObject)//hide": { + Doc: "fyne.CanvasObject.Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//hide: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//hide: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.Size) + "Go(fyne.CanvasObject)//min-size": { + Doc: "fyne.CanvasObject.MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//min-size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//min-size: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.CanvasObject) + // * 1 - Go(fyne.Position) + "Go(fyne.CanvasObject)//move": { + Doc: "fyne.CanvasObject.Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//move: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//move: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.position) + "Go(fyne.CanvasObject)//position": { + Doc: "fyne.CanvasObject.Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//position: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//position: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.CanvasObject) + "Go(fyne.CanvasObject)//refresh": { + Doc: "fyne.CanvasObject.Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//refresh: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//refresh: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.CanvasObject) + // * 1 - Go(fyne.Size) + "Go(fyne.CanvasObject)//resize": { + Doc: "fyne.CanvasObject.Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//resize: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//resize: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.CanvasObject) + "Go(fyne.CanvasObject)//show": { + Doc: "fyne.CanvasObject.Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//show: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//show: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.size) + "Go(fyne.CanvasObject)//size": { + Doc: "fyne.CanvasObject.Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//size: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.CanvasObject) + // Result: + // * bool + "Go(fyne.CanvasObject)//visible": { + Doc: "fyne.CanvasObject.Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//visible: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//visible: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CanvasObject)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Clipboard) + // Result: + // * string + "Go(fyne.Clipboard)//content": { + Doc: "fyne.Clipboard.Content", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Clipboard + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Clipboard(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Clipboard)//content: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Clipboard); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Clipboard)//content: arg 1: " + "expected native of type fyne.Clipboard, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Clipboard)//content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Clipboard)//content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Content() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Clipboard) + // * content - string + "Go(fyne.Clipboard)//set-content": { + Doc: "fyne.Clipboard.SetContent", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Clipboard + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Clipboard(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Clipboard)//set-content: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Clipboard); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Clipboard)//set-content: arg 1: " + "expected native of type fyne.Clipboard, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Clipboard)//set-content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Clipboard)//set-content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Clipboard)//set-content: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetContent(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.CloudProvider) + // * 1 - Go(fyne.App) + "Go(fyne.CloudProvider)//cleanup": { + Doc: "fyne.CloudProvider.Cleanup", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CloudProvider + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CloudProvider(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//cleanup: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CloudProvider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//cleanup: arg 1: " + "expected native of type fyne.CloudProvider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//cleanup: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//cleanup: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.App + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//cleanup: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//cleanup: arg 2: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//cleanup: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//cleanup: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Cleanup(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.CloudProvider) + // Result: + // * string + "Go(fyne.CloudProvider)//provider-description": { + Doc: "fyne.CloudProvider.ProviderDescription", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CloudProvider + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CloudProvider(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//provider-description: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CloudProvider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//provider-description: arg 1: " + "expected native of type fyne.CloudProvider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//provider-description: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//provider-description: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ProviderDescription() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.CloudProvider) + // Result: + // * Go(fyne.Resource) + "Go(fyne.CloudProvider)//provider-icon": { + Doc: "fyne.CloudProvider.ProviderIcon", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CloudProvider + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CloudProvider(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//provider-icon: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CloudProvider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//provider-icon: arg 1: " + "expected native of type fyne.CloudProvider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//provider-icon: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//provider-icon: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ProviderIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.CloudProvider) + // Result: + // * string + "Go(fyne.CloudProvider)//provider-name": { + Doc: "fyne.CloudProvider.ProviderName", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CloudProvider + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CloudProvider(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//provider-name: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CloudProvider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//provider-name: arg 1: " + "expected native of type fyne.CloudProvider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//provider-name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//provider-name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ProviderName() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.CloudProvider) + // * 1 - Go(fyne.App) + // Result: + // * error + "Go(fyne.CloudProvider)//setup": { + Doc: "fyne.CloudProvider.Setup", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CloudProvider + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CloudProvider(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//setup: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CloudProvider); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//setup: arg 1: " + "expected native of type fyne.CloudProvider, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//setup: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//setup: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.App + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//setup: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//setup: arg 2: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//setup: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProvider)//setup: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Setup(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.CloudProviderPreferences) + // * 1 - Go(fyne.App) + // Result: + // * Go(fyne.Preferences) + "Go(fyne.CloudProviderPreferences)//cloud-preferences": { + Doc: "fyne.CloudProviderPreferences.CloudPreferences", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CloudProviderPreferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CloudProviderPreferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderPreferences)//cloud-preferences: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CloudProviderPreferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderPreferences)//cloud-preferences: arg 1: " + "expected native of type fyne.CloudProviderPreferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderPreferences)//cloud-preferences: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderPreferences)//cloud-preferences: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.App + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderPreferences)//cloud-preferences: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderPreferences)//cloud-preferences: arg 2: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderPreferences)//cloud-preferences: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderPreferences)//cloud-preferences: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CloudPreferences(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Preferences)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.CloudProviderStorage) + // * 1 - Go(fyne.App) + // Result: + // * Go(fyne.Storage) + "Go(fyne.CloudProviderStorage)//cloud-storage": { + Doc: "fyne.CloudProviderStorage.CloudStorage", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CloudProviderStorage + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CloudProviderStorage(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderStorage)//cloud-storage: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CloudProviderStorage); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderStorage)//cloud-storage: arg 1: " + "expected native of type fyne.CloudProviderStorage, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderStorage)//cloud-storage: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderStorage)//cloud-storage: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.App + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderStorage)//cloud-storage: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderStorage)//cloud-storage: arg 2: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderStorage)//cloud-storage: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.CloudProviderStorage)//cloud-storage: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CloudStorage(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Storage)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Device) + // Result: + // * bool + "Go(fyne.Device)//has-keyboard": { + Doc: "fyne.Device.HasKeyboard", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Device + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Device(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//has-keyboard: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Device); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//has-keyboard: arg 1: " + "expected native of type fyne.Device, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//has-keyboard: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//has-keyboard: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.HasKeyboard() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Device) + // Result: + // * bool + "Go(fyne.Device)//is-browser": { + Doc: "fyne.Device.IsBrowser", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Device + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Device(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//is-browser: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Device); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//is-browser: arg 1: " + "expected native of type fyne.Device, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//is-browser: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//is-browser: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.IsBrowser() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Device) + // Result: + // * bool + "Go(fyne.Device)//is-mobile": { + Doc: "fyne.Device.IsMobile", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Device + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Device(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//is-mobile: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Device); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//is-mobile: arg 1: " + "expected native of type fyne.Device, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//is-mobile: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//is-mobile: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.IsMobile() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Device) + // Result: + // * Go(fyne.locale) + "Go(fyne.Device)//locale": { + Doc: "fyne.Device.Locale", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Device + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Device(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//locale: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Device); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//locale: arg 1: " + "expected native of type fyne.Device, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//locale: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//locale: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Locale() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(fyne.Locale)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Device) + // Result: + // * integer + "Go(fyne.Device)//orientation": { + Doc: "fyne.Device.Orientation", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Device + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Device(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//orientation: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Device); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//orientation: arg 1: " + "expected native of type fyne.Device, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//orientation: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//orientation: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Orientation() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(int(res0))) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Device) + // * 1 - Go(fyne.Window) + // Result: + // * decimal + "Go(fyne.Device)//system-scale-for-window": { + Doc: "fyne.Device.SystemScaleForWindow", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Device + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Device(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//system-scale-for-window: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Device); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//system-scale-for-window: arg 1: " + "expected native of type fyne.Device, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//system-scale-for-window: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//system-scale-for-window: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Window + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//system-scale-for-window: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//system-scale-for-window: arg 2: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//system-scale-for-window: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Device)//system-scale-for-window: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.SystemScaleForWindow(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.disableable) + "Go(fyne.Disableable)//disable": { + Doc: "fyne.Disableable.Disable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Disableable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Disableable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Disableable)//disable: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Disableable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Disableable)//disable: arg 1: " + "expected native of type fyne.Disableable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Disableable)//disable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Disableable)//disable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Disable() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Disableable) + // Result: + // * bool + "Go(fyne.Disableable)//disabled": { + Doc: "fyne.Disableable.Disabled", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Disableable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Disableable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Disableable)//disabled: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Disableable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Disableable)//disabled: arg 1: " + "expected native of type fyne.Disableable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Disableable)//disabled: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Disableable)//disabled: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Disabled() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Disableable) + "Go(fyne.Disableable)//enable": { + Doc: "fyne.Disableable.Enable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Disableable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Disableable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Disableable)//enable: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Disableable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Disableable)//enable: arg 1: " + "expected native of type fyne.Disableable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Disableable)//enable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Disableable)//enable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Enable() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.DoubleTappable) + // * 1 - Go(*fyne.PointEvent) + "Go(fyne.DoubleTappable)//double-tapped": { + Doc: "fyne.DoubleTappable.DoubleTapped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.DoubleTappable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_DoubleTappable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.DoubleTappable)//double-tapped: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.DoubleTappable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.DoubleTappable)//double-tapped: arg 1: " + "expected native of type fyne.DoubleTappable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.DoubleTappable)//double-tapped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.DoubleTappable)//double-tapped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.DoubleTappable)//double-tapped: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.DoubleTappable)//double-tapped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.DoubleTappable)//double-tapped: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.DoubleTapped(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Draggable) + "Go(fyne.Draggable)//drag-end": { + Doc: "fyne.Draggable.DragEnd", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Draggable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Draggable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Draggable)//drag-end: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Draggable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Draggable)//drag-end: arg 1: " + "expected native of type fyne.Draggable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Draggable)//drag-end: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Draggable)//drag-end: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.DragEnd() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Draggable) + // * 1 - Go(*fyne.DragEvent) + "Go(fyne.Draggable)//dragged": { + Doc: "fyne.Draggable.Dragged", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Draggable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Draggable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Draggable)//dragged: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Draggable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Draggable)//dragged: arg 1: " + "expected native of type fyne.Draggable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Draggable)//dragged: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Draggable)//dragged: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.DragEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.DragEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Draggable)//dragged: arg 2: " + "expected native of type *fyne.DragEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Draggable)//dragged: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Draggable)//dragged: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Dragged(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Driver) + // * 1 - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.Position) + "Go(fyne.Driver)//absolute-position-for-object": { + Doc: "fyne.Driver.AbsolutePositionForObject", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Driver + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//absolute-position-for-object: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Driver); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//absolute-position-for-object: arg 1: " + "expected native of type fyne.Driver, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//absolute-position-for-object: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//absolute-position-for-object: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//absolute-position-for-object: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//absolute-position-for-object: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//absolute-position-for-object: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//absolute-position-for-object: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.AbsolutePositionForObject(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Driver) + // Result: + // * block[Go(fyne.Window)] + "Go(fyne.Driver)//all-windows": { + Doc: "fyne.Driver.AllWindows", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Driver + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//all-windows: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Driver); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//all-windows: arg 1: " + "expected native of type fyne.Driver, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//all-windows: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//all-windows: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.AllWindows() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.Window)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Driver) + // * 1 - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.Canvas) + "Go(fyne.Driver)//canvas-for-object": { + Doc: "fyne.Driver.CanvasForObject", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Driver + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//canvas-for-object: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Driver); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//canvas-for-object: arg 1: " + "expected native of type fyne.Driver, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//canvas-for-object: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//canvas-for-object: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//canvas-for-object: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//canvas-for-object: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//canvas-for-object: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//canvas-for-object: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CanvasForObject(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Canvas)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Driver) + // * 1 - string + // Result: + // * Go(fyne.Window) + "Go(fyne.Driver)//create-window": { + Doc: "fyne.Driver.CreateWindow", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Driver + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//create-window: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Driver); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//create-window: arg 1: " + "expected native of type fyne.Driver, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//create-window: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//create-window: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//create-window: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.CreateWindow(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Window)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Driver) + // Result: + // * Go(fyne.device) + "Go(fyne.Driver)//device": { + Doc: "fyne.Driver.Device", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Driver + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//device: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Driver); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//device: arg 1: " + "expected native of type fyne.Driver, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//device: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//device: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Device() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Device)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Driver) + // Result: + // * Go(time.Duration) + "Go(fyne.Driver)//double-tap-delay": { + Doc: "fyne.Driver.DoubleTapDelay", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Driver + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//double-tap-delay: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Driver); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//double-tap-delay: arg 1: " + "expected native of type fyne.Driver, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//double-tap-delay: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//double-tap-delay: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.DoubleTapDelay() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(time.Duration)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Driver) + "Go(fyne.Driver)//quit": { + Doc: "fyne.Driver.Quit", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Driver + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//quit: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Driver); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//quit: arg 1: " + "expected native of type fyne.Driver, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//quit: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//quit: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Quit() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Driver) + // * text - string + // * font-size - decimal + // * style - Go(fyne.TextStyle) + // * source - Go(fyne.Resource) + // Result: + // [ + // Go(fyne.Size) + // decimal + // ] + "Go(fyne.Driver)//rendered-text-size": { + Doc: "fyne.Driver.RenderedTextSize", + Argsn: 5, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Driver + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//rendered-text-size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Driver); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//rendered-text-size: arg 1: " + "expected native of type fyne.Driver, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//rendered-text-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//rendered-text-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//rendered-text-size: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val float32 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//rendered-text-size: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val fyne.TextStyle + switch v := arg3.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + arg3Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//rendered-text-size: arg 4: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//rendered-text-size: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg4Val fyne.Resource + switch v := arg4.(type) { + case env.RyeCtx: + var err error + arg4Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//rendered-text-size: arg 5: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg4Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//rendered-text-size: arg 5: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//rendered-text-size: arg 5: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg4Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//rendered-text-size: arg 5: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1 := arg0Val.RenderedTextSize(arg1Val, arg2Val, arg3Val, arg4Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + var res1Obj env.Object + res1Obj = *env.NewDecimal(float64(res1)) + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(fyne.Driver) + "Go(fyne.Driver)//run": { + Doc: "fyne.Driver.Run", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Driver + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//run: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Driver); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//run: arg 1: " + "expected native of type fyne.Driver, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//run: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//run: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Run() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Driver) + // * 1 - bool + "Go(fyne.Driver)//set-disable-screen-blanking": { + Doc: "fyne.Driver.SetDisableScreenBlanking", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Driver + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//set-disable-screen-blanking: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Driver); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//set-disable-screen-blanking: arg 1: " + "expected native of type fyne.Driver, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//set-disable-screen-blanking: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//set-disable-screen-blanking: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//set-disable-screen-blanking: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetDisableScreenBlanking(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Driver) + // * 1 - Go(*fyne.Animation) + "Go(fyne.Driver)//start-animation": { + Doc: "fyne.Driver.StartAnimation", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Driver + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//start-animation: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Driver); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//start-animation: arg 1: " + "expected native of type fyne.Driver, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//start-animation: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//start-animation: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.Animation + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Animation); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//start-animation: arg 2: " + "expected native of type *fyne.Animation, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//start-animation: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//start-animation: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.StartAnimation(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Driver) + // * 1 - Go(*fyne.Animation) + "Go(fyne.Driver)//stop-animation": { + Doc: "fyne.Driver.StopAnimation", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Driver + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//stop-animation: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Driver); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//stop-animation: arg 1: " + "expected native of type fyne.Driver, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//stop-animation: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//stop-animation: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.Animation + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Animation); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//stop-animation: arg 2: " + "expected native of type *fyne.Animation, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//stop-animation: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Driver)//stop-animation: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.StopAnimation(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Focusable) + "Go(fyne.Focusable)//focus-gained": { + Doc: "fyne.Focusable.FocusGained", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Focusable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Focusable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//focus-gained: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Focusable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//focus-gained: arg 1: " + "expected native of type fyne.Focusable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//focus-gained: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//focus-gained: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusGained() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Focusable) + "Go(fyne.Focusable)//focus-lost": { + Doc: "fyne.Focusable.FocusLost", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Focusable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Focusable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//focus-lost: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Focusable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//focus-lost: arg 1: " + "expected native of type fyne.Focusable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//focus-lost: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//focus-lost: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusLost() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Focusable) + // * 1 - Go(*fyne.KeyEvent) + "Go(fyne.Focusable)//typed-key": { + Doc: "fyne.Focusable.TypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Focusable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Focusable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//typed-key: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Focusable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//typed-key: arg 1: " + "expected native of type fyne.Focusable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//typed-key: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//typed-key: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedKey(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Focusable) + // * 1 - Go(rune) + "Go(fyne.Focusable)//typed-rune": { + Doc: "fyne.Focusable.TypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Focusable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Focusable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//typed-rune: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Focusable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//typed-rune: arg 1: " + "expected native of type fyne.Focusable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//typed-rune: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Focusable)//typed-rune: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedRune(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.keyboardShortcut) + // Result: + // * string + "Go(fyne.KeyboardShortcut)//key": { + Doc: "fyne.KeyboardShortcut.Key", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.KeyboardShortcut + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_KeyboardShortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.KeyboardShortcut)//key: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.KeyboardShortcut); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.KeyboardShortcut)//key: arg 1: " + "expected native of type fyne.KeyboardShortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.KeyboardShortcut)//key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.KeyboardShortcut)//key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Key() + var res0Obj env.Object + res0Obj = *env.NewString(string(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.KeyboardShortcut) + // Result: + // * integer + "Go(fyne.KeyboardShortcut)//mod": { + Doc: "fyne.KeyboardShortcut.Mod", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.KeyboardShortcut + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_KeyboardShortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.KeyboardShortcut)//mod: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.KeyboardShortcut); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.KeyboardShortcut)//mod: arg 1: " + "expected native of type fyne.KeyboardShortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.KeyboardShortcut)//mod: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.KeyboardShortcut)//mod: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Mod() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(int(res0))) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.KeyboardShortcut) + // Result: + // * string + "Go(fyne.KeyboardShortcut)//shortcut-name": { + Doc: "fyne.KeyboardShortcut.ShortcutName", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.KeyboardShortcut + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_KeyboardShortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.KeyboardShortcut)//shortcut-name: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.KeyboardShortcut); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.KeyboardShortcut)//shortcut-name: arg 1: " + "expected native of type fyne.KeyboardShortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.KeyboardShortcut)//shortcut-name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.KeyboardShortcut)//shortcut-name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ShortcutName() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.layout) + // * 1 - block[Go(fyne.CanvasObject)] + // * 2 - Go(fyne.Size) + "Go(fyne.Layout)//layout": { + Doc: "fyne.Layout.Layout", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Layout + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Layout(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//layout: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Layout); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//layout: arg 1: " + "expected native of type fyne.Layout, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//layout: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//layout: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []fyne.CanvasObject + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//layout: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//layout: arg 2: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//layout: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//layout: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//layout: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//layout: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Size + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//layout: arg 3: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//layout: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Layout(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Layout) + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(fyne.Size) + "Go(fyne.Layout)//min-size": { + Doc: "fyne.Layout.MinSize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Layout + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Layout(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//min-size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Layout); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//min-size: arg 1: " + "expected native of type fyne.Layout, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []fyne.CanvasObject + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//min-size: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//min-size: arg 2: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//min-size: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//min-size: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//min-size: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Layout)//min-size: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(color.Color) + "Go(fyne.LegacyTheme)//background-color": { + Doc: "fyne.LegacyTheme.BackgroundColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//background-color: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//background-color: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//background-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//background-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.BackgroundColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(color.Color) + "Go(fyne.LegacyTheme)//button-color": { + Doc: "fyne.LegacyTheme.ButtonColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//button-color: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//button-color: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//button-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//button-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ButtonColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(color.Color) + "Go(fyne.LegacyTheme)//disabled-button-color": { + Doc: "fyne.LegacyTheme.DisabledButtonColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//disabled-button-color: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//disabled-button-color: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//disabled-button-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//disabled-button-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.DisabledButtonColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(color.Color) + "Go(fyne.LegacyTheme)//disabled-text-color": { + Doc: "fyne.LegacyTheme.DisabledTextColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//disabled-text-color: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//disabled-text-color: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//disabled-text-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//disabled-text-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.DisabledTextColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(color.Color) + "Go(fyne.LegacyTheme)//focus-color": { + Doc: "fyne.LegacyTheme.FocusColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//focus-color: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//focus-color: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//focus-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//focus-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.FocusColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(color.Color) + "Go(fyne.LegacyTheme)//hover-color": { + Doc: "fyne.LegacyTheme.HoverColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//hover-color: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//hover-color: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//hover-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//hover-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.HoverColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * integer + "Go(fyne.LegacyTheme)//icon-inline-size": { + Doc: "fyne.LegacyTheme.IconInlineSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//icon-inline-size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//icon-inline-size: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//icon-inline-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//icon-inline-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.IconInlineSize() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * integer + "Go(fyne.LegacyTheme)//padding": { + Doc: "fyne.LegacyTheme.Padding", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//padding: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//padding: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//padding: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//padding: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Padding() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(color.Color) + "Go(fyne.LegacyTheme)//place-holder-color": { + Doc: "fyne.LegacyTheme.PlaceHolderColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//place-holder-color: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//place-holder-color: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//place-holder-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//place-holder-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.PlaceHolderColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(color.Color) + "Go(fyne.LegacyTheme)//primary-color": { + Doc: "fyne.LegacyTheme.PrimaryColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//primary-color: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//primary-color: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//primary-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//primary-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.PrimaryColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(color.Color) + "Go(fyne.LegacyTheme)//scroll-bar-color": { + Doc: "fyne.LegacyTheme.ScrollBarColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//scroll-bar-color: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//scroll-bar-color: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//scroll-bar-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//scroll-bar-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ScrollBarColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * integer + "Go(fyne.LegacyTheme)//scroll-bar-size": { + Doc: "fyne.LegacyTheme.ScrollBarSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//scroll-bar-size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//scroll-bar-size: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//scroll-bar-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//scroll-bar-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ScrollBarSize() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * integer + "Go(fyne.LegacyTheme)//scroll-bar-small-size": { + Doc: "fyne.LegacyTheme.ScrollBarSmallSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//scroll-bar-small-size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//scroll-bar-small-size: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//scroll-bar-small-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//scroll-bar-small-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ScrollBarSmallSize() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(color.Color) + "Go(fyne.LegacyTheme)//shadow-color": { + Doc: "fyne.LegacyTheme.ShadowColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//shadow-color: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//shadow-color: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//shadow-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//shadow-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ShadowColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(fyne.Resource) + "Go(fyne.LegacyTheme)//text-bold-font": { + Doc: "fyne.LegacyTheme.TextBoldFont", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-bold-font: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-bold-font: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-bold-font: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-bold-font: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.TextBoldFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(fyne.Resource) + "Go(fyne.LegacyTheme)//text-bold-italic-font": { + Doc: "fyne.LegacyTheme.TextBoldItalicFont", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-bold-italic-font: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-bold-italic-font: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-bold-italic-font: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-bold-italic-font: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.TextBoldItalicFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(color.Color) + "Go(fyne.LegacyTheme)//text-color": { + Doc: "fyne.LegacyTheme.TextColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-color: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-color: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.TextColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(fyne.Resource) + "Go(fyne.LegacyTheme)//text-font": { + Doc: "fyne.LegacyTheme.TextFont", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-font: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-font: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-font: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-font: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.TextFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(fyne.Resource) + "Go(fyne.LegacyTheme)//text-italic-font": { + Doc: "fyne.LegacyTheme.TextItalicFont", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-italic-font: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-italic-font: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-italic-font: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-italic-font: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.TextItalicFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * Go(fyne.Resource) + "Go(fyne.LegacyTheme)//text-monospace-font": { + Doc: "fyne.LegacyTheme.TextMonospaceFont", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-monospace-font: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-monospace-font: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-monospace-font: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-monospace-font: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.TextMonospaceFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.LegacyTheme) + // Result: + // * integer + "Go(fyne.LegacyTheme)//text-size": { + Doc: "fyne.LegacyTheme.TextSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-size: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.LegacyTheme)//text-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.TextSize() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Lifecycle) + // * 1 - fn { } + "Go(fyne.Lifecycle)//set-on-entered-foreground": { + Doc: "fyne.Lifecycle.SetOnEnteredForeground", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Lifecycle + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Lifecycle(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-entered-foreground: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Lifecycle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-entered-foreground: arg 1: " + "expected native of type fyne.Lifecycle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-entered-foreground: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-entered-foreground: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-entered-foreground: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-entered-foreground: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-entered-foreground: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnEnteredForeground(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Lifecycle) + // * 1 - fn { } + "Go(fyne.Lifecycle)//set-on-exited-foreground": { + Doc: "fyne.Lifecycle.SetOnExitedForeground", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Lifecycle + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Lifecycle(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-exited-foreground: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Lifecycle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-exited-foreground: arg 1: " + "expected native of type fyne.Lifecycle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-exited-foreground: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-exited-foreground: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-exited-foreground: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-exited-foreground: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-exited-foreground: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnExitedForeground(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Lifecycle) + // * 1 - fn { } + "Go(fyne.Lifecycle)//set-on-started": { + Doc: "fyne.Lifecycle.SetOnStarted", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Lifecycle + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Lifecycle(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-started: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Lifecycle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-started: arg 1: " + "expected native of type fyne.Lifecycle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-started: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-started: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-started: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-started: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-started: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnStarted(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Lifecycle) + // * 1 - fn { } + "Go(fyne.Lifecycle)//set-on-stopped": { + Doc: "fyne.Lifecycle.SetOnStopped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Lifecycle + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Lifecycle(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-stopped: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Lifecycle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-stopped: arg 1: " + "expected native of type fyne.Lifecycle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-stopped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-stopped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-stopped: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-stopped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Lifecycle)//set-on-stopped: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnStopped(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.ListableURI) + // Result: + // * string + "Go(fyne.ListableURI)//authority": { + Doc: "fyne.ListableURI.Authority", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ListableURI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_ListableURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//authority: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.ListableURI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//authority: arg 1: " + "expected native of type fyne.ListableURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//authority: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//authority: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Authority() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.ListableURI) + // Result: + // * string + "Go(fyne.ListableURI)//extension": { + Doc: "fyne.ListableURI.Extension", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ListableURI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_ListableURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//extension: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.ListableURI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//extension: arg 1: " + "expected native of type fyne.ListableURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//extension: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//extension: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Extension() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.ListableURI) + // Result: + // * string + "Go(fyne.ListableURI)//fragment": { + Doc: "fyne.ListableURI.Fragment", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ListableURI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_ListableURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//fragment: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.ListableURI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//fragment: arg 1: " + "expected native of type fyne.ListableURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//fragment: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//fragment: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Fragment() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.listableURI) + // Result: + // * block[Go(fyne.URI)] + // * error + "Go(fyne.ListableURI)//list": { + Doc: "fyne.ListableURI.List", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ListableURI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_ListableURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//list: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.ListableURI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//list: arg 1: " + "expected native of type fyne.ListableURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.List() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.URI)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.ListableURI) + // Result: + // * string + "Go(fyne.ListableURI)//mime-type": { + Doc: "fyne.ListableURI.MimeType", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ListableURI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_ListableURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//mime-type: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.ListableURI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//mime-type: arg 1: " + "expected native of type fyne.ListableURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//mime-type: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//mime-type: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MimeType() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.ListableURI) + // Result: + // * string + "Go(fyne.ListableURI)//name": { + Doc: "fyne.ListableURI.Name", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ListableURI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_ListableURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//name: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.ListableURI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//name: arg 1: " + "expected native of type fyne.ListableURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Name() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.ListableURI) + // Result: + // * string + "Go(fyne.ListableURI)//path": { + Doc: "fyne.ListableURI.Path", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ListableURI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_ListableURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//path: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.ListableURI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//path: arg 1: " + "expected native of type fyne.ListableURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//path: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//path: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Path() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.ListableURI) + // Result: + // * string + "Go(fyne.ListableURI)//query": { + Doc: "fyne.ListableURI.Query", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ListableURI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_ListableURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//query: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.ListableURI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//query: arg 1: " + "expected native of type fyne.ListableURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//query: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//query: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Query() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.ListableURI) + // Result: + // * string + "Go(fyne.ListableURI)//scheme": { + Doc: "fyne.ListableURI.Scheme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ListableURI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_ListableURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//scheme: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.ListableURI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//scheme: arg 1: " + "expected native of type fyne.ListableURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//scheme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//scheme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Scheme() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.ListableURI) + // Result: + // * string + "Go(fyne.ListableURI)//string": { + Doc: "fyne.ListableURI.String", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ListableURI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_ListableURI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//string: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.ListableURI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//string: arg 1: " + "expected native of type fyne.ListableURI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//string: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.ListableURI)//string: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.String() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // language-string returns a version of the local without the script portion. + // For example "en" or "fr-FR". + // + // Args: + // * recv - Go(fyne.Locale) + // Result: + // * string + "Go(fyne.Locale)//language-string": { + Doc: "fyne.Locale.LanguageString", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Locale + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal fyne.Locale + if natOk { + natVal, natValOk = nat.Value.(fyne.Locale) + } + if natValOk { + arg0Val = natVal + } else { + var u string + if vc, ok := arg0.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Locale)//language-string: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = fyne.Locale(u) + } + } + res0 := arg0Val.LanguageString() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // string returns the complete locale as a standard string. + // + // Args: + // * recv - Go(fyne.Locale) + // Result: + // * string + "Go(fyne.Locale)//string": { + Doc: "fyne.Locale.String", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Locale + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal fyne.Locale + if natOk { + natVal, natValOk = nat.Value.(fyne.Locale) + } + if natValOk { + arg0Val = natVal + } else { + var u string + if vc, ok := arg0.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Locale)//string: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = fyne.Locale(u) + } + } + res0 := arg0Val.String() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.OverlayStack) + // * overlay - Go(fyne.CanvasObject) + "Go(fyne.OverlayStack)//add": { + Doc: "fyne.OverlayStack.Add", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.OverlayStack + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_OverlayStack(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//add: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.OverlayStack); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//add: arg 1: " + "expected native of type fyne.OverlayStack, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//add: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//add: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//add: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//add: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//add: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//add: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Add(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.OverlayStack) + // Result: + // * block[Go(fyne.CanvasObject)] + "Go(fyne.OverlayStack)//list": { + Doc: "fyne.OverlayStack.List", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.OverlayStack + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_OverlayStack(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//list: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.OverlayStack); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//list: arg 1: " + "expected native of type fyne.OverlayStack, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.List() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.CanvasObject)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.OverlayStack) + // * overlay - Go(fyne.CanvasObject) + "Go(fyne.OverlayStack)//remove": { + Doc: "fyne.OverlayStack.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.OverlayStack + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_OverlayStack(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.OverlayStack); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//remove: arg 1: " + "expected native of type fyne.OverlayStack, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//remove: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//remove: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//remove: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//remove: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Remove(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.OverlayStack) + // Result: + // * Go(fyne.CanvasObject) + "Go(fyne.OverlayStack)//top": { + Doc: "fyne.OverlayStack.Top", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.OverlayStack + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_OverlayStack(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//top: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.OverlayStack); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//top: arg 1: " + "expected native of type fyne.OverlayStack, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//top: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.OverlayStack)//top: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Top() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * 1 - fn { } + "Go(fyne.Preferences)//add-change-listener": { + Doc: "fyne.Preferences.AddChangeListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//add-change-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//add-change-listener: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//add-change-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//add-change-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//add-change-listener: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//add-change-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//add-change-listener: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.AddChangeListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // Result: + // * bool + "Go(fyne.Preferences)//bool": { + Doc: "fyne.Preferences.Bool", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.Bool(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // Result: + // * block[bool] + "Go(fyne.Preferences)//bool-list": { + Doc: "fyne.Preferences.BoolList", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-list: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-list: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-list: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.BoolList(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(boolToInt64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * fallback - block[bool] + // Result: + // * block[bool] + "Go(fyne.Preferences)//bool-list-with-fallback": { + Doc: "fyne.Preferences.BoolListWithFallback", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-list-with-fallback: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-list-with-fallback: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-list-with-fallback: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-list-with-fallback: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-list-with-fallback: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val []bool + switch v := arg2.(type) { + case env.Block: + arg2Val = make([]bool, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg2Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-list-with-fallback: arg 3: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-list-with-fallback: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-list-with-fallback: arg 3: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.BoolListWithFallback(arg1Val, arg2Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(boolToInt64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * fallback - bool + // Result: + // * bool + "Go(fyne.Preferences)//bool-with-fallback": { + Doc: "fyne.Preferences.BoolWithFallback", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-with-fallback: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-with-fallback: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-with-fallback: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-with-fallback: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-with-fallback: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val bool + if vc, ok := arg2.(env.Integer); ok { + arg2Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//bool-with-fallback: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + res0 := arg0Val.BoolWithFallback(arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // Result: + // * block[fn { }] + "Go(fyne.Preferences)//change-listeners": { + Doc: "fyne.Preferences.ChangeListeners", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//change-listeners: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//change-listeners: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//change-listeners: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//change-listeners: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ChangeListeners() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + it() + return nil + }, 0, false, false, "Returned func") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // Result: + // * decimal + "Go(fyne.Preferences)//float": { + Doc: "fyne.Preferences.Float", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.Float(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // Result: + // * block[decimal] + "Go(fyne.Preferences)//float-list": { + Doc: "fyne.Preferences.FloatList", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-list: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-list: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-list: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.FloatList(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewDecimal(float64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * fallback - block[decimal] + // Result: + // * block[decimal] + "Go(fyne.Preferences)//float-list-with-fallback": { + Doc: "fyne.Preferences.FloatListWithFallback", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-list-with-fallback: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-list-with-fallback: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-list-with-fallback: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-list-with-fallback: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-list-with-fallback: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val []float64 + switch v := arg2.(type) { + case env.Block: + arg2Val = make([]float64, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg2Val[i] + if vc, ok := it.(env.Decimal); ok { + (*iv) = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-list-with-fallback: arg 3: " + "block item: " + "expected decimal, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-list-with-fallback: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-list-with-fallback: arg 3: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.FloatListWithFallback(arg1Val, arg2Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewDecimal(float64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * fallback - decimal + // Result: + // * decimal + "Go(fyne.Preferences)//float-with-fallback": { + Doc: "fyne.Preferences.FloatWithFallback", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-with-fallback: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-with-fallback: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-with-fallback: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-with-fallback: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-with-fallback: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val float64 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//float-with-fallback: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + res0 := arg0Val.FloatWithFallback(arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // Result: + // * integer + "Go(fyne.Preferences)//int": { + Doc: "fyne.Preferences.Int", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.Int(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // Result: + // * block[integer] + "Go(fyne.Preferences)//int-list": { + Doc: "fyne.Preferences.IntList", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-list: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-list: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-list: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.IntList(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * fallback - block[integer] + // Result: + // * block[integer] + "Go(fyne.Preferences)//int-list-with-fallback": { + Doc: "fyne.Preferences.IntListWithFallback", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-list-with-fallback: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-list-with-fallback: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-list-with-fallback: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-list-with-fallback: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-list-with-fallback: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val []int + switch v := arg2.(type) { + case env.Block: + arg2Val = make([]int, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg2Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-list-with-fallback: arg 3: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-list-with-fallback: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-list-with-fallback: arg 3: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.IntListWithFallback(arg1Val, arg2Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * fallback - integer + // Result: + // * integer + "Go(fyne.Preferences)//int-with-fallback": { + Doc: "fyne.Preferences.IntWithFallback", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-with-fallback: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-with-fallback: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-with-fallback: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-with-fallback: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-with-fallback: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val int + if vc, ok := arg2.(env.Integer); ok { + arg2Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//int-with-fallback: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + res0 := arg0Val.IntWithFallback(arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + "Go(fyne.Preferences)//remove-value": { + Doc: "fyne.Preferences.RemoveValue", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//remove-value: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//remove-value: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//remove-value: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//remove-value: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//remove-value: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.RemoveValue(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * value - bool + "Go(fyne.Preferences)//set-bool": { + Doc: "fyne.Preferences.SetBool", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-bool: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-bool: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-bool: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-bool: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-bool: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val bool + if vc, ok := arg2.(env.Integer); ok { + arg2Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-bool: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + arg0Val.SetBool(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * value - block[bool] + "Go(fyne.Preferences)//set-bool-list": { + Doc: "fyne.Preferences.SetBoolList", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-bool-list: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-bool-list: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-bool-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-bool-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-bool-list: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val []bool + switch v := arg2.(type) { + case env.Block: + arg2Val = make([]bool, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg2Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-bool-list: arg 3: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-bool-list: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-bool-list: arg 3: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetBoolList(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * value - decimal + "Go(fyne.Preferences)//set-float": { + Doc: "fyne.Preferences.SetFloat", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-float: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-float: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-float: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-float: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-float: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val float64 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-float: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + arg0Val.SetFloat(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * value - block[decimal] + "Go(fyne.Preferences)//set-float-list": { + Doc: "fyne.Preferences.SetFloatList", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-float-list: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-float-list: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-float-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-float-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-float-list: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val []float64 + switch v := arg2.(type) { + case env.Block: + arg2Val = make([]float64, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg2Val[i] + if vc, ok := it.(env.Decimal); ok { + (*iv) = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-float-list: arg 3: " + "block item: " + "expected decimal, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-float-list: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-float-list: arg 3: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetFloatList(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * value - integer + "Go(fyne.Preferences)//set-int": { + Doc: "fyne.Preferences.SetInt", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-int: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-int: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-int: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-int: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-int: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val int + if vc, ok := arg2.(env.Integer); ok { + arg2Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-int: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + arg0Val.SetInt(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * value - block[integer] + "Go(fyne.Preferences)//set-int-list": { + Doc: "fyne.Preferences.SetIntList", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-int-list: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-int-list: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-int-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-int-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-int-list: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val []int + switch v := arg2.(type) { + case env.Block: + arg2Val = make([]int, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg2Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-int-list: arg 3: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-int-list: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-int-list: arg 3: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetIntList(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * value - string + "Go(fyne.Preferences)//set-string": { + Doc: "fyne.Preferences.SetString", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-string: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-string: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-string: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-string: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-string: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-string: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + arg0Val.SetString(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * value - block[string] + "Go(fyne.Preferences)//set-string-list": { + Doc: "fyne.Preferences.SetStringList", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-string-list: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-string-list: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-string-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-string-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-string-list: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val []string + switch v := arg2.(type) { + case env.Block: + arg2Val = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg2Val[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-string-list: arg 3: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-string-list: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//set-string-list: arg 3: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetStringList(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // Result: + // * string + "Go(fyne.Preferences)//string": { + Doc: "fyne.Preferences.String", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.String(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // Result: + // * block[string] + "Go(fyne.Preferences)//string-list": { + Doc: "fyne.Preferences.StringList", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-list: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-list: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-list: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := arg0Val.StringList(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * fallback - block[string] + // Result: + // * block[string] + "Go(fyne.Preferences)//string-list-with-fallback": { + Doc: "fyne.Preferences.StringListWithFallback", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-list-with-fallback: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-list-with-fallback: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-list-with-fallback: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-list-with-fallback: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-list-with-fallback: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val []string + switch v := arg2.(type) { + case env.Block: + arg2Val = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg2Val[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-list-with-fallback: arg 3: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-list-with-fallback: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-list-with-fallback: arg 3: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.StringListWithFallback(arg1Val, arg2Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Preferences) + // * key - string + // * fallback - string + // Result: + // * string + "Go(fyne.Preferences)//string-with-fallback": { + Doc: "fyne.Preferences.StringWithFallback", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Preferences + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-with-fallback: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-with-fallback: arg 1: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-with-fallback: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-with-fallback: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-with-fallback: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Preferences)//string-with-fallback: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + res0 := arg0Val.StringWithFallback(arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Resource) + // Result: + // * block[integer] + "Go(fyne.Resource)//content": { + Doc: "fyne.Resource.Content", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Resource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Resource)//content: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Resource)//content: arg 1: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Resource)//content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Resource)//content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Content() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Resource) + // Result: + // * string + "Go(fyne.Resource)//name": { + Doc: "fyne.Resource.Name", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Resource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Resource)//name: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Resource)//name: arg 1: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Resource)//name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Resource)//name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Name() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Scrollable) + // * 1 - Go(*fyne.ScrollEvent) + "Go(fyne.Scrollable)//scrolled": { + Doc: "fyne.Scrollable.Scrolled", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Scrollable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Scrollable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Scrollable)//scrolled: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Scrollable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Scrollable)//scrolled: arg 1: " + "expected native of type fyne.Scrollable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Scrollable)//scrolled: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Scrollable)//scrolled: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.ScrollEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.ScrollEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Scrollable)//scrolled: arg 2: " + "expected native of type *fyne.ScrollEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Scrollable)//scrolled: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Scrollable)//scrolled: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Scrolled(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.SecondaryTappable) + // * 1 - Go(*fyne.PointEvent) + "Go(fyne.SecondaryTappable)//tapped-secondary": { + Doc: "fyne.SecondaryTappable.TappedSecondary", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.SecondaryTappable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_SecondaryTappable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.SecondaryTappable)//tapped-secondary: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.SecondaryTappable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.SecondaryTappable)//tapped-secondary: arg 1: " + "expected native of type fyne.SecondaryTappable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.SecondaryTappable)//tapped-secondary: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.SecondaryTappable)//tapped-secondary: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.SecondaryTappable)//tapped-secondary: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.SecondaryTappable)//tapped-secondary: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.SecondaryTappable)//tapped-secondary: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TappedSecondary(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Settings) + // * 1 - Go(chan fyne.Settings) + "Go(fyne.Settings)//add-change-listener": { + Doc: "fyne.Settings.AddChangeListener", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Settings + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Settings(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//add-change-listener: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Settings); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//add-change-listener: arg 1: " + "expected native of type fyne.Settings, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//add-change-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//add-change-listener: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val chan fyne.Settings + switch v := arg1.(type) { + case env.Native: + ch, ok := v.Value.(chan *env.Object) + if !ok { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//add-change-listener: arg 2: " + "expected Rye-channel (native of type chan *env.Object) or nil, but got " + objectDebugString(ps.Idx, arg1)) + } + go func() { + for { + select { + case v, ok := <-ch: + if !ok { + close(arg1Val) + return + } + var ov fyne.Settings + switch v := (*v).(type) { + case env.RyeCtx: + var err error + ov, err = ctxTo_fyne_Settings(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n", + "Go(fyne.Settings)//add-change-listener: arg 2: channel object: "+err.Error(), + ) + return + } + case env.Native: + if vc, ok := v.Value.(fyne.Settings); ok { + ov = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n", + "Go(fyne.Settings)//add-change-listener: arg 2: channel object: "+"expected native of type fyne.Settings, but got "+objectDebugString(ps.Idx, v), + ) + return + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n", + "Go(fyne.Settings)//add-change-listener: arg 2: channel object: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + ) + return + } + ov = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n", + "Go(fyne.Settings)//add-change-listener: arg 2: channel object: "+"expected native, but got "+objectDebugString(ps.Idx, v), + ) + return + } + arg1Val <- ov + case v, ok := <-arg1Val: + if !ok { + close(ch) + return + } + var ov env.Object + ov = ifaceToNative(ps.Idx, v, "Go(fyne.Settings)") + ch <- &ov + } + } + }() + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//add-change-listener: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + } + arg0Val.AddChangeListener(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Settings) + // Result: + // * integer + "Go(fyne.Settings)//build-type": { + Doc: "fyne.Settings.BuildType", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Settings + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Settings(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//build-type: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Settings); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//build-type: arg 1: " + "expected native of type fyne.Settings, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//build-type: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//build-type: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.BuildType() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(int(res0))) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Settings) + // Result: + // * string + "Go(fyne.Settings)//primary-color": { + Doc: "fyne.Settings.PrimaryColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Settings + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Settings(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//primary-color: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Settings); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//primary-color: arg 1: " + "expected native of type fyne.Settings, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//primary-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//primary-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.PrimaryColor() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Settings) + // Result: + // * decimal + "Go(fyne.Settings)//scale": { + Doc: "fyne.Settings.Scale", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Settings + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Settings(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//scale: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Settings); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//scale: arg 1: " + "expected native of type fyne.Settings, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//scale: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//scale: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Scale() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Settings) + // * 1 - Go(fyne.Theme) + "Go(fyne.Settings)//set-theme": { + Doc: "fyne.Settings.SetTheme", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Settings + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Settings(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//set-theme: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Settings); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//set-theme: arg 1: " + "expected native of type fyne.Settings, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//set-theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//set-theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Theme + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Theme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//set-theme: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Theme); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//set-theme: arg 2: " + "expected native of type fyne.Theme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//set-theme: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//set-theme: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetTheme(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Settings) + // Result: + // * bool + "Go(fyne.Settings)//show-animations": { + Doc: "fyne.Settings.ShowAnimations", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Settings + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Settings(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//show-animations: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Settings); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//show-animations: arg 1: " + "expected native of type fyne.Settings, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//show-animations: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//show-animations: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ShowAnimations() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Settings) + // Result: + // * Go(fyne.theme) + "Go(fyne.Settings)//theme": { + Doc: "fyne.Settings.Theme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Settings + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Settings(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//theme: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Settings); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//theme: arg 1: " + "expected native of type fyne.Settings, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Settings) + // Result: + // * integer + "Go(fyne.Settings)//theme-variant": { + Doc: "fyne.Settings.ThemeVariant", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Settings + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Settings(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//theme-variant: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Settings); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//theme-variant: arg 1: " + "expected native of type fyne.Settings, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//theme-variant: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Settings)//theme-variant: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ThemeVariant() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(uint(res0))) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Shortcut) + // Result: + // * string + "Go(fyne.Shortcut)//shortcut-name": { + Doc: "fyne.Shortcut.ShortcutName", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Shortcut + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Shortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Shortcut)//shortcut-name: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Shortcut); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Shortcut)//shortcut-name: arg 1: " + "expected native of type fyne.Shortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Shortcut)//shortcut-name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Shortcut)//shortcut-name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ShortcutName() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Shortcutable) + // * 1 - Go(fyne.Shortcut) + "Go(fyne.Shortcutable)//typed-shortcut": { + Doc: "fyne.Shortcutable.TypedShortcut", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Shortcutable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Shortcutable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Shortcutable)//typed-shortcut: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Shortcutable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Shortcutable)//typed-shortcut: arg 1: " + "expected native of type fyne.Shortcutable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Shortcutable)//typed-shortcut: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Shortcutable)//typed-shortcut: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Shortcut + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Shortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Shortcutable)//typed-shortcut: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Shortcut); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Shortcutable)//typed-shortcut: arg 2: " + "expected native of type fyne.Shortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Shortcutable)//typed-shortcut: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Shortcutable)//typed-shortcut: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedShortcut(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Storage) + // * name - string + // Result: + // * Go(fyne.URIWriteCloser) + // * error + "Go(fyne.Storage)//create": { + Doc: "fyne.Storage.Create", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Storage + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Storage(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//create: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Storage); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//create: arg 1: " + "expected native of type fyne.Storage, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//create: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//create: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//create: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.Create(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URIWriteCloser)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Storage) + // Result: + // * block[string] + "Go(fyne.Storage)//list": { + Doc: "fyne.Storage.List", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Storage + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Storage(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//list: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Storage); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//list: arg 1: " + "expected native of type fyne.Storage, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.List() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Storage) + // * name - string + // Result: + // * Go(fyne.URIReadCloser) + // * error + "Go(fyne.Storage)//open": { + Doc: "fyne.Storage.Open", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Storage + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Storage(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//open: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Storage); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//open: arg 1: " + "expected native of type fyne.Storage, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//open: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//open: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//open: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.Open(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URIReadCloser)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Storage) + // * name - string + // Result: + // * error + "Go(fyne.Storage)//remove": { + Doc: "fyne.Storage.Remove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Storage + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Storage(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//remove: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Storage); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//remove: arg 1: " + "expected native of type fyne.Storage, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//remove: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//remove: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//remove: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := arg0Val.Remove(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Storage) + // Result: + // * Go(fyne.URI) + "Go(fyne.Storage)//root-uri": { + Doc: "fyne.Storage.RootURI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Storage + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Storage(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//root-uri: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Storage); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//root-uri: arg 1: " + "expected native of type fyne.Storage, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//root-uri: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//root-uri: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.RootURI() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Storage) + // * name - string + // Result: + // * Go(fyne.URIWriteCloser) + // * error + "Go(fyne.Storage)//save": { + Doc: "fyne.Storage.Save", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Storage + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Storage(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//save: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Storage); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//save: arg 1: " + "expected native of type fyne.Storage, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//save: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//save: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Storage)//save: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.Save(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URIWriteCloser)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Tabbable) + // Result: + // * bool + "Go(fyne.Tabbable)//accepts-tab": { + Doc: "fyne.Tabbable.AcceptsTab", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Tabbable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Tabbable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Tabbable)//accepts-tab: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Tabbable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Tabbable)//accepts-tab: arg 1: " + "expected native of type fyne.Tabbable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Tabbable)//accepts-tab: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Tabbable)//accepts-tab: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.AcceptsTab() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Tappable) + // * 1 - Go(*fyne.PointEvent) + "Go(fyne.Tappable)//tapped": { + Doc: "fyne.Tappable.Tapped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Tappable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Tappable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Tappable)//tapped: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Tappable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Tappable)//tapped: arg 1: " + "expected native of type fyne.Tappable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Tappable)//tapped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Tappable)//tapped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.PointEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.PointEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Tappable)//tapped: arg 2: " + "expected native of type *fyne.PointEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Tappable)//tapped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Tappable)//tapped: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Tapped(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Theme) + // * 1 - string + // * 2 - integer + // Result: + // * Go(color.color) + "Go(fyne.Theme)//color": { + Doc: "fyne.Theme.Color", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Theme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Theme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//color: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Theme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//color: arg 1: " + "expected native of type fyne.Theme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.ThemeColorName + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.ThemeColorName + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeColorName) + } + if natValOk { + arg1Val = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//color: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = fyne.ThemeColorName(u) + } + } + var arg2Val fyne.ThemeVariant + { + nat, natOk := arg2.(env.Native) + var natValOk bool + var natVal fyne.ThemeVariant + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeVariant) + } + if natValOk { + arg2Val = natVal + } else { + var u uint + if vc, ok := arg2.(env.Integer); ok { + u = uint(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//color: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + arg2Val = fyne.ThemeVariant(u) + } + } + res0 := arg0Val.Color(arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Theme) + // * 1 - Go(fyne.TextStyle) + // Result: + // * Go(fyne.Resource) + "Go(fyne.Theme)//font": { + Doc: "fyne.Theme.Font", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Theme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Theme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//font: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Theme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//font: arg 1: " + "expected native of type fyne.Theme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//font: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//font: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.TextStyle + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//font: arg 2: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//font: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Font(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Theme) + // * 1 - string + // Result: + // * Go(fyne.Resource) + "Go(fyne.Theme)//icon": { + Doc: "fyne.Theme.Icon", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Theme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Theme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//icon: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Theme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//icon: arg 1: " + "expected native of type fyne.Theme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//icon: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//icon: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.ThemeIconName + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.ThemeIconName + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeIconName) + } + if natValOk { + arg1Val = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//icon: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = fyne.ThemeIconName(u) + } + } + res0 := arg0Val.Icon(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Theme) + // * 1 - string + // Result: + // * decimal + "Go(fyne.Theme)//size": { + Doc: "fyne.Theme.Size", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Theme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Theme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Theme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//size: arg 1: " + "expected native of type fyne.Theme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.ThemeSizeName + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.ThemeSizeName + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeSizeName) + } + if natValOk { + arg1Val = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Theme)//size: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = fyne.ThemeSizeName(u) + } + } + res0 := arg0Val.Size(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.ThemedResource) + // Result: + // * block[integer] + "Go(fyne.ThemedResource)//content": { + Doc: "fyne.ThemedResource.Content", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ThemedResource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_ThemedResource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.ThemedResource)//content: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.ThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.ThemedResource)//content: arg 1: " + "expected native of type fyne.ThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.ThemedResource)//content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.ThemedResource)//content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Content() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewInteger(int64(it)) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.ThemedResource) + // Result: + // * string + "Go(fyne.ThemedResource)//name": { + Doc: "fyne.ThemedResource.Name", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ThemedResource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_ThemedResource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.ThemedResource)//name: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.ThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.ThemedResource)//name: arg 1: " + "expected native of type fyne.ThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.ThemedResource)//name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.ThemedResource)//name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Name() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.ThemedResource) + // Result: + // * string + "Go(fyne.ThemedResource)//theme-color-name": { + Doc: "fyne.ThemedResource.ThemeColorName", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ThemedResource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_ThemedResource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.ThemedResource)//theme-color-name: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.ThemedResource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.ThemedResource)//theme-color-name: arg 1: " + "expected native of type fyne.ThemedResource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.ThemedResource)//theme-color-name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.ThemedResource)//theme-color-name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ThemeColorName() + var res0Obj env.Object + res0Obj = *env.NewString(string(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URI) + // Result: + // * string + "Go(fyne.URI)//authority": { + Doc: "fyne.URI.Authority", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//authority: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//authority: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//authority: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//authority: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Authority() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URI) + // Result: + // * string + "Go(fyne.URI)//extension": { + Doc: "fyne.URI.Extension", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//extension: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//extension: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//extension: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//extension: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Extension() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URI) + // Result: + // * string + "Go(fyne.URI)//fragment": { + Doc: "fyne.URI.Fragment", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//fragment: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//fragment: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//fragment: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//fragment: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Fragment() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URI) + // Result: + // * string + "Go(fyne.URI)//mime-type": { + Doc: "fyne.URI.MimeType", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//mime-type: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//mime-type: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//mime-type: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//mime-type: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MimeType() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URI) + // Result: + // * string + "Go(fyne.URI)//name": { + Doc: "fyne.URI.Name", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//name: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//name: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Name() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URI) + // Result: + // * string + "Go(fyne.URI)//path": { + Doc: "fyne.URI.Path", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//path: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//path: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//path: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//path: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Path() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URI) + // Result: + // * string + "Go(fyne.URI)//query": { + Doc: "fyne.URI.Query", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//query: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//query: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//query: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//query: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Query() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URI) + // Result: + // * string + "Go(fyne.URI)//scheme": { + Doc: "fyne.URI.Scheme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//scheme: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//scheme: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//scheme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//scheme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Scheme() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URI) + // Result: + // * string + "Go(fyne.URI)//string": { + Doc: "fyne.URI.String", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//string: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//string: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//string: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URI)//string: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.String() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URIReadcloser) + // Result: + // * error + "Go(fyne.URIReadCloser)//close": { + Doc: "fyne.URIReadCloser.Close", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIReadCloser + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIReadCloser(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIReadCloser)//close: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIReadCloser); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIReadCloser)//close: arg 1: " + "expected native of type fyne.URIReadCloser, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIReadCloser)//close: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIReadCloser)//close: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Close() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.URIreadCloser) + // * p - block[integer] + // Result: + // * integer + // * error + "Go(fyne.URIReadCloser)//read": { + Doc: "fyne.URIReadCloser.Read", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIReadCloser + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIReadCloser(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIReadCloser)//read: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIReadCloser); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIReadCloser)//read: arg 1: " + "expected native of type fyne.URIReadCloser, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIReadCloser)//read: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIReadCloser)//read: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []byte + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIReadCloser)//read: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIReadCloser)//read: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIReadCloser)//read: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Read(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.uriReadCloser) + // Result: + // * Go(fyne.uri) + "Go(fyne.URIReadCloser)//uri": { + Doc: "fyne.URIReadCloser.URI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIReadCloser + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIReadCloser(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIReadCloser)//uri: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIReadCloser); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIReadCloser)//uri: arg 1: " + "expected native of type fyne.URIReadCloser, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIReadCloser)//uri: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIReadCloser)//uri: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.URI() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URIWithIcon) + // Result: + // * string + "Go(fyne.URIWithIcon)//authority": { + Doc: "fyne.URIWithIcon.Authority", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIWithIcon + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIWithIcon(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//authority: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWithIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//authority: arg 1: " + "expected native of type fyne.URIWithIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//authority: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//authority: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Authority() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URIWithIcon) + // Result: + // * string + "Go(fyne.URIWithIcon)//extension": { + Doc: "fyne.URIWithIcon.Extension", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIWithIcon + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIWithIcon(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//extension: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWithIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//extension: arg 1: " + "expected native of type fyne.URIWithIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//extension: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//extension: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Extension() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URIWithIcon) + // Result: + // * string + "Go(fyne.URIWithIcon)//fragment": { + Doc: "fyne.URIWithIcon.Fragment", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIWithIcon + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIWithIcon(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//fragment: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWithIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//fragment: arg 1: " + "expected native of type fyne.URIWithIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//fragment: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//fragment: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Fragment() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URIWithicon) + // Result: + // * Go(fyne.Resource) + "Go(fyne.URIWithIcon)//icon": { + Doc: "fyne.URIWithIcon.Icon", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIWithIcon + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIWithIcon(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//icon: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWithIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//icon: arg 1: " + "expected native of type fyne.URIWithIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//icon: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//icon: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Icon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URIWithIcon) + // Result: + // * string + "Go(fyne.URIWithIcon)//mime-type": { + Doc: "fyne.URIWithIcon.MimeType", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIWithIcon + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIWithIcon(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//mime-type: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWithIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//mime-type: arg 1: " + "expected native of type fyne.URIWithIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//mime-type: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//mime-type: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MimeType() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URIWithIcon) + // Result: + // * string + "Go(fyne.URIWithIcon)//name": { + Doc: "fyne.URIWithIcon.Name", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIWithIcon + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIWithIcon(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//name: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWithIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//name: arg 1: " + "expected native of type fyne.URIWithIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//name: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//name: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Name() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URIWithIcon) + // Result: + // * string + "Go(fyne.URIWithIcon)//path": { + Doc: "fyne.URIWithIcon.Path", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIWithIcon + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIWithIcon(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//path: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWithIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//path: arg 1: " + "expected native of type fyne.URIWithIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//path: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//path: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Path() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URIWithIcon) + // Result: + // * string + "Go(fyne.URIWithIcon)//query": { + Doc: "fyne.URIWithIcon.Query", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIWithIcon + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIWithIcon(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//query: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWithIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//query: arg 1: " + "expected native of type fyne.URIWithIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//query: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//query: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Query() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URIWithIcon) + // Result: + // * string + "Go(fyne.URIWithIcon)//scheme": { + Doc: "fyne.URIWithIcon.Scheme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIWithIcon + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIWithIcon(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//scheme: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWithIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//scheme: arg 1: " + "expected native of type fyne.URIWithIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//scheme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//scheme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Scheme() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URIWithIcon) + // Result: + // * string + "Go(fyne.URIWithIcon)//string": { + Doc: "fyne.URIWithIcon.String", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIWithIcon + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIWithIcon(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//string: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWithIcon); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//string: arg 1: " + "expected native of type fyne.URIWithIcon, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//string: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWithIcon)//string: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.String() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URIWritecloser) + // Result: + // * error + "Go(fyne.URIWriteCloser)//close": { + Doc: "fyne.URIWriteCloser.Close", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIWriteCloser + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIWriteCloser(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWriteCloser)//close: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWriteCloser); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWriteCloser)//close: arg 1: " + "expected native of type fyne.URIWriteCloser, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWriteCloser)//close: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWriteCloser)//close: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Close() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.uriWriteCloser) + // Result: + // * Go(fyne.uri) + "Go(fyne.URIWriteCloser)//uri": { + Doc: "fyne.URIWriteCloser.URI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIWriteCloser + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIWriteCloser(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWriteCloser)//uri: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWriteCloser); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWriteCloser)//uri: arg 1: " + "expected native of type fyne.URIWriteCloser, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWriteCloser)//uri: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWriteCloser)//uri: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.URI() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.URIwriteCloser) + // * p - block[integer] + // Result: + // * integer + // * error + "Go(fyne.URIWriteCloser)//write": { + Doc: "fyne.URIWriteCloser.Write", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URIWriteCloser + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URIWriteCloser(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWriteCloser)//write: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URIWriteCloser); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWriteCloser)//write: arg 1: " + "expected native of type fyne.URIWriteCloser, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWriteCloser)//write: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWriteCloser)//write: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []byte + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWriteCloser)//write: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWriteCloser)//write: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.URIWriteCloser)//write: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Write(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Validatable) + // * 1 - fn { Go(error) } + "Go(fyne.Validatable)//set-on-validation-changed": { + Doc: "fyne.Validatable.SetOnValidationChanged", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Validatable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Validatable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Validatable)//set-on-validation-changed: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Validatable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Validatable)//set-on-validation-changed: arg 1: " + "expected native of type fyne.Validatable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Validatable)//set-on-validation-changed: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Validatable)//set-on-validation-changed: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(error) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Validatable)//set-on-validation-changed: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 error) { + var farg0Val env.Object + if farg0 != nil { + farg0Val = env.NewError(farg0.Error()) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Validatable)//set-on-validation-changed: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Validatable)//set-on-validation-changed: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnValidationChanged(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Validatable) + // Result: + // * error + "Go(fyne.Validatable)//validate": { + Doc: "fyne.Validatable.Validate", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Validatable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Validatable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Validatable)//validate: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Validatable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Validatable)//validate: arg 1: " + "expected native of type fyne.Validatable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Validatable)//validate: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Validatable)//validate: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Validate() + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Vector2) + // Result: + // [ + // decimal + // decimal + // ] + "Go(fyne.Vector2)//components": { + Doc: "fyne.Vector2.Components", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Vector2 + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Vector2(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Vector2)//components: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Vector2); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Vector2)//components: arg 1: " + "expected native of type fyne.Vector2, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Vector2)//components: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Vector2)//components: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1 := arg0Val.Components() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + var res1Obj env.Object + res1Obj = *env.NewDecimal(float64(res1)) + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(fyne.Vector2) + // Result: + // * bool + "Go(fyne.Vector2)//is-zero": { + Doc: "fyne.Vector2.IsZero", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Vector2 + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Vector2(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Vector2)//is-zero: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Vector2); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Vector2)//is-zero: arg 1: " + "expected native of type fyne.Vector2, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Vector2)//is-zero: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Vector2)//is-zero: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.IsZero() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Widget) + // Result: + // * Go(fyne.WidgetRenderer) + "Go(fyne.Widget)//create-renderer": { + Doc: "fyne.Widget.CreateRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Widget + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//create-renderer: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//create-renderer: arg 1: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//create-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//create-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.CreateRenderer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Widget) + "Go(fyne.Widget)//hide": { + Doc: "fyne.Widget.Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Widget + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//hide: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//hide: arg 1: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Widget) + // Result: + // * Go(fyne.Size) + "Go(fyne.Widget)//min-size": { + Doc: "fyne.Widget.MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Widget + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//min-size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//min-size: arg 1: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Widget) + // * 1 - Go(fyne.Position) + "Go(fyne.Widget)//move": { + Doc: "fyne.Widget.Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Widget + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//move: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//move: arg 1: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//move: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Move(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Widget) + // Result: + // * Go(fyne.position) + "Go(fyne.Widget)//position": { + Doc: "fyne.Widget.Position", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Widget + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//position: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//position: arg 1: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Position() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Widget) + "Go(fyne.Widget)//refresh": { + Doc: "fyne.Widget.Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Widget + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//refresh: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//refresh: arg 1: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Widget) + // * 1 - Go(fyne.Size) + "Go(fyne.Widget)//resize": { + Doc: "fyne.Widget.Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Widget + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//resize: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//resize: arg 1: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Widget) + "Go(fyne.Widget)//show": { + Doc: "fyne.Widget.Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Widget + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//show: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//show: arg 1: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Widget) + // Result: + // * Go(fyne.size) + "Go(fyne.Widget)//size": { + Doc: "fyne.Widget.Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Widget + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//size: arg 1: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Widget) + // Result: + // * bool + "Go(fyne.Widget)//visible": { + Doc: "fyne.Widget.Visible", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Widget + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//visible: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//visible: arg 1: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//visible: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Widget)//visible: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visible() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.WidgetRenderer) + "Go(fyne.WidgetRenderer)//destroy": { + Doc: "fyne.WidgetRenderer.Destroy", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.WidgetRenderer + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_WidgetRenderer(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//destroy: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.WidgetRenderer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//destroy: arg 1: " + "expected native of type fyne.WidgetRenderer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//destroy: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//destroy: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Destroy() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.WidgetRenderer) + // * 1 - Go(fyne.Size) + "Go(fyne.WidgetRenderer)//layout": { + Doc: "fyne.WidgetRenderer.Layout", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.WidgetRenderer + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_WidgetRenderer(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//layout: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.WidgetRenderer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//layout: arg 1: " + "expected native of type fyne.WidgetRenderer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//layout: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//layout: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//layout: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//layout: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Layout(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.WidgetRenderer) + // Result: + // * Go(fyne.Size) + "Go(fyne.WidgetRenderer)//min-size": { + Doc: "fyne.WidgetRenderer.MinSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.WidgetRenderer + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_WidgetRenderer(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//min-size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.WidgetRenderer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//min-size: arg 1: " + "expected native of type fyne.WidgetRenderer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//min-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//min-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MinSize() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.WidgetRenderer) + // Result: + // * block[Go(fyne.CanvasObject)] + "Go(fyne.WidgetRenderer)//objects": { + Doc: "fyne.WidgetRenderer.Objects", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.WidgetRenderer + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_WidgetRenderer(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//objects: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.WidgetRenderer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//objects: arg 1: " + "expected native of type fyne.WidgetRenderer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//objects: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//objects: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Objects() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.CanvasObject)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.WidgetRenderer) + "Go(fyne.WidgetRenderer)//refresh": { + Doc: "fyne.WidgetRenderer.Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.WidgetRenderer + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_WidgetRenderer(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//refresh: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.WidgetRenderer); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//refresh: arg 1: " + "expected native of type fyne.WidgetRenderer, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.WidgetRenderer)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // Result: + // * Go(fyne.canvas) + "Go(fyne.Window)//canvas": { + Doc: "fyne.Window.Canvas", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//canvas: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//canvas: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//canvas: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//canvas: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Canvas() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Canvas)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Window) + "Go(fyne.Window)//center-on-screen": { + Doc: "fyne.Window.CenterOnScreen", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//center-on-screen: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//center-on-screen: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//center-on-screen: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//center-on-screen: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.CenterOnScreen() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // Result: + // * Go(fyne.clipboard) + "Go(fyne.Window)//clipboard": { + Doc: "fyne.Window.Clipboard", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//clipboard: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//clipboard: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//clipboard: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//clipboard: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Clipboard() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Clipboard)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Window) + "Go(fyne.Window)//close": { + Doc: "fyne.Window.Close", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//close: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//close: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//close: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//close: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Close() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // Result: + // * Go(fyne.CanvasObject) + "Go(fyne.Window)//content": { + Doc: "fyne.Window.Content", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//content: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//content: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Content() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Window) + // Result: + // * bool + "Go(fyne.Window)//fixed-size": { + Doc: "fyne.Window.FixedSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//fixed-size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//fixed-size: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//fixed-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//fixed-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.FixedSize() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Window) + // Result: + // * bool + "Go(fyne.Window)//full-screen": { + Doc: "fyne.Window.FullScreen", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//full-screen: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//full-screen: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//full-screen: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//full-screen: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.FullScreen() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Window) + "Go(fyne.Window)//hide": { + Doc: "fyne.Window.Hide", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//hide: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//hide: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//hide: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//hide: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Hide() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // Result: + // * Go(fyne.Resource) + "Go(fyne.Window)//icon": { + Doc: "fyne.Window.Icon", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//icon: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//icon: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//icon: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//icon: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Icon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Window) + // Result: + // * Go(*fyne.main-menu) + "Go(fyne.Window)//main-menu": { + Doc: "fyne.Window.MainMenu", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//main-menu: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//main-menu: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//main-menu: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//main-menu: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.MainMenu() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.MainMenu)") + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Window) + // Result: + // * bool + "Go(fyne.Window)//padded": { + Doc: "fyne.Window.Padded", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//padded: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//padded: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//padded: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//padded: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Padded() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne.Window) + "Go(fyne.Window)//request-focus": { + Doc: "fyne.Window.RequestFocus", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//request-focus: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//request-focus: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//request-focus: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//request-focus: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RequestFocus() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // * 1 - Go(fyne.Size) + "Go(fyne.Window)//resize": { + Doc: "fyne.Window.Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//resize: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//resize: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // * 1 - fn { } + "Go(fyne.Window)//set-close-intercept": { + Doc: "fyne.Window.SetCloseIntercept", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-close-intercept: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-close-intercept: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-close-intercept: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-close-intercept: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-close-intercept: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-close-intercept: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-close-intercept: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetCloseIntercept(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // * 1 - Go(fyne.CanvasObject) + "Go(fyne.Window)//set-content": { + Doc: "fyne.Window.SetContent", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-content: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-content: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-content: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-content: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-content: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-content: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetContent(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // * 1 - bool + "Go(fyne.Window)//set-fixed-size": { + Doc: "fyne.Window.SetFixedSize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-fixed-size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-fixed-size: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-fixed-size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-fixed-size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-fixed-size: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetFixedSize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // * 1 - bool + "Go(fyne.Window)//set-full-screen": { + Doc: "fyne.Window.SetFullScreen", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-full-screen: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-full-screen: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-full-screen: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-full-screen: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-full-screen: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetFullScreen(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // * 1 - Go(fyne.Resource) + "Go(fyne.Window)//set-icon": { + Doc: "fyne.Window.SetIcon", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-icon: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-icon: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-icon: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-icon: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-icon: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-icon: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-icon: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-icon: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetIcon(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // * 1 - Go(*fyne.MainMenu) + "Go(fyne.Window)//set-main-menu": { + Doc: "fyne.Window.SetMainMenu", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-main-menu: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-main-menu: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-main-menu: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-main-menu: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.MainMenu + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MainMenu); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-main-menu: arg 2: " + "expected native of type *fyne.MainMenu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-main-menu: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-main-menu: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetMainMenu(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + "Go(fyne.Window)//set-master": { + Doc: "fyne.Window.SetMaster", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-master: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-master: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-master: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-master: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetMaster() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // * 1 - fn { } + "Go(fyne.Window)//set-on-closed": { + Doc: "fyne.Window.SetOnClosed", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-on-closed: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-on-closed: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-on-closed: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-on-closed: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-on-closed: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-on-closed: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-on-closed: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnClosed(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // * 1 - fn { Go(fyne.Position) block[Go(fyne.URI)] } + "Go(fyne.Window)//set-on-dropped": { + Doc: "fyne.Window.SetOnDropped", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-on-dropped: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-on-dropped: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-on-dropped: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-on-dropped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(fyne.Position, []fyne.URI) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-on-dropped: arg 2: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 fyne.Position, farg1 []fyne.URI) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*fyne.Position)") + { + items := make([]env.Object, len(farg1)) + for i, it := range farg1 { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.URI)") + } + farg1Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-on-dropped: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-on-dropped: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnDropped(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // * 1 - bool + "Go(fyne.Window)//set-padded": { + Doc: "fyne.Window.SetPadded", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-padded: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-padded: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-padded: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-padded: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-padded: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetPadded(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // * 1 - string + "Go(fyne.Window)//set-title": { + Doc: "fyne.Window.SetTitle", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-title: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-title: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-title: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-title: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//set-title: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetTitle(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + "Go(fyne.Window)//show": { + Doc: "fyne.Window.Show", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//show: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//show: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//show: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//show: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Show() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + "Go(fyne.Window)//show-and-run": { + Doc: "fyne.Window.ShowAndRun", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//show-and-run: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//show-and-run: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//show-and-run: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//show-and-run: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ShowAndRun() + return arg0 + }, + }, + // Args: + // * recv - Go(fyne.Window) + // Result: + // * string + "Go(fyne.Window)//title": { + Doc: "fyne.Window.Title", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//title: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//title: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//title: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne.Window)//title: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Title() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(fyne_driver.NativeWindow) + // * 1 - fn { Go(any) } + "Go(fyne_driver.NativeWindow)//run-native": { + Doc: "fyne_driver.NativeWindow.RunNative", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne_driver.NativeWindow + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_driver_NativeWindow(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(fyne_driver.NativeWindow)//run-native: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne_driver.NativeWindow); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(fyne_driver.NativeWindow)//run-native: arg 1: " + "expected native of type fyne_driver.NativeWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne_driver.NativeWindow)//run-native: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne_driver.NativeWindow)//run-native: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(any) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(fyne_driver.NativeWindow)//run-native: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 any) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(fyne_driver.NativeWindow)//run-native: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(fyne_driver.NativeWindow)//run-native: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.RunNative(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(layout.SpacerObject) + // Result: + // * bool + "Go(layout.SpacerObject)//expand-horizontal": { + Doc: "layout.SpacerObject.ExpandHorizontal", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val layout.SpacerObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_layout_SpacerObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(layout.SpacerObject)//expand-horizontal: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(layout.SpacerObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(layout.SpacerObject)//expand-horizontal: arg 1: " + "expected native of type layout.SpacerObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(layout.SpacerObject)//expand-horizontal: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(layout.SpacerObject)//expand-horizontal: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ExpandHorizontal() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(layout.SpacerObject) + // Result: + // * bool + "Go(layout.SpacerObject)//expand-vertical": { + Doc: "layout.SpacerObject.ExpandVertical", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val layout.SpacerObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_layout_SpacerObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(layout.SpacerObject)//expand-vertical: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(layout.SpacerObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(layout.SpacerObject)//expand-vertical: arg 1: " + "expected native of type layout.SpacerObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(layout.SpacerObject)//expand-vertical: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(layout.SpacerObject)//expand-vertical: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ExpandVertical() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(mobile.Device) + "Go(mobile.Device)//hide-virtual-keyboard": { + Doc: "mobile.Device.HideVirtualKeyboard", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val mobile.Device + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_mobile_Device(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(mobile.Device)//hide-virtual-keyboard: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(mobile.Device); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Device)//hide-virtual-keyboard: arg 1: " + "expected native of type mobile.Device, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Device)//hide-virtual-keyboard: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Device)//hide-virtual-keyboard: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.HideVirtualKeyboard() + return arg0 + }, + }, + // Args: + // * recv - Go(mobile.Device) + "Go(mobile.Device)//show-virtual-keyboard": { + Doc: "mobile.Device.ShowVirtualKeyboard", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val mobile.Device + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_mobile_Device(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(mobile.Device)//show-virtual-keyboard: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(mobile.Device); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Device)//show-virtual-keyboard: arg 1: " + "expected native of type mobile.Device, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Device)//show-virtual-keyboard: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Device)//show-virtual-keyboard: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.ShowVirtualKeyboard() + return arg0 + }, + }, + // Args: + // * recv - Go(mobile.Device) + // * 1 - integer + "Go(mobile.Device)//show-virtual-keyboard-type": { + Doc: "mobile.Device.ShowVirtualKeyboardType", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val mobile.Device + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_mobile_Device(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(mobile.Device)//show-virtual-keyboard-type: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(mobile.Device); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Device)//show-virtual-keyboard-type: arg 1: " + "expected native of type mobile.Device, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Device)//show-virtual-keyboard-type: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Device)//show-virtual-keyboard-type: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val mobile.KeyboardType + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal mobile.KeyboardType + if natOk { + natVal, natValOk = nat.Value.(mobile.KeyboardType) + } + if natValOk { + arg1Val = natVal + } else { + var u int32 + if vc, ok := arg1.(env.Integer); ok { + u = int32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Device)//show-virtual-keyboard-type: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = mobile.KeyboardType(u) + } + } + arg0Val.ShowVirtualKeyboardType(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(mobile.Driver) + "Go(mobile.Driver)//go-back": { + Doc: "mobile.Driver.GoBack", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val mobile.Driver + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_mobile_Driver(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(mobile.Driver)//go-back: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(mobile.Driver); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Driver)//go-back: arg 1: " + "expected native of type mobile.Driver, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Driver)//go-back: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Driver)//go-back: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.GoBack() + return arg0 + }, + }, + // Args: + // * recv - Go(mobile.Keyboardable) + "Go(mobile.Keyboardable)//focus-gained": { + Doc: "mobile.Keyboardable.FocusGained", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val mobile.Keyboardable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_mobile_Keyboardable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//focus-gained: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(mobile.Keyboardable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//focus-gained: arg 1: " + "expected native of type mobile.Keyboardable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//focus-gained: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//focus-gained: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusGained() + return arg0 + }, + }, + // Args: + // * recv - Go(mobile.Keyboardable) + "Go(mobile.Keyboardable)//focus-lost": { + Doc: "mobile.Keyboardable.FocusLost", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val mobile.Keyboardable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_mobile_Keyboardable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//focus-lost: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(mobile.Keyboardable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//focus-lost: arg 1: " + "expected native of type mobile.Keyboardable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//focus-lost: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//focus-lost: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusLost() + return arg0 + }, + }, + // Args: + // * recv - Go(mobile.keyboardable) + // Result: + // * integer + "Go(mobile.Keyboardable)//keyboard": { + Doc: "mobile.Keyboardable.Keyboard", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val mobile.Keyboardable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_mobile_Keyboardable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//keyboard: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(mobile.Keyboardable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//keyboard: arg 1: " + "expected native of type mobile.Keyboardable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//keyboard: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//keyboard: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Keyboard() + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(int32(res0))) + return res0Obj + }, + }, + // Args: + // * recv - Go(mobile.Keyboardable) + // * 1 - Go(*fyne.KeyEvent) + "Go(mobile.Keyboardable)//typed-key": { + Doc: "mobile.Keyboardable.TypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val mobile.Keyboardable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_mobile_Keyboardable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//typed-key: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(mobile.Keyboardable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//typed-key: arg 1: " + "expected native of type mobile.Keyboardable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.KeyEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//typed-key: arg 2: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//typed-key: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedKey(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(mobile.Keyboardable) + // * 1 - Go(rune) + "Go(mobile.Keyboardable)//typed-rune": { + Doc: "mobile.Keyboardable.TypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val mobile.Keyboardable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_mobile_Keyboardable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//typed-rune: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(mobile.Keyboardable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//typed-rune: arg 1: " + "expected native of type mobile.Keyboardable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//typed-rune: arg 2: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Keyboardable)//typed-rune: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TypedRune(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(mobile.Touchable) + // * 1 - Go(*mobile.TouchEvent) + "Go(mobile.Touchable)//touch-cancel": { + Doc: "mobile.Touchable.TouchCancel", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val mobile.Touchable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_mobile_Touchable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-cancel: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(mobile.Touchable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-cancel: arg 1: " + "expected native of type mobile.Touchable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-cancel: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-cancel: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *mobile.TouchEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-cancel: arg 2: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-cancel: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-cancel: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TouchCancel(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(mobile.Touchable) + // * 1 - Go(*mobile.TouchEvent) + "Go(mobile.Touchable)//touch-down": { + Doc: "mobile.Touchable.TouchDown", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val mobile.Touchable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_mobile_Touchable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-down: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(mobile.Touchable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-down: arg 1: " + "expected native of type mobile.Touchable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-down: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-down: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *mobile.TouchEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-down: arg 2: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-down: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-down: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TouchDown(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(mobile.Touchable) + // * 1 - Go(*mobile.TouchEvent) + "Go(mobile.Touchable)//touch-up": { + Doc: "mobile.Touchable.TouchUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val mobile.Touchable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_mobile_Touchable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-up: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(mobile.Touchable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-up: arg 1: " + "expected native of type mobile.Touchable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *mobile.TouchEvent + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*mobile.TouchEvent); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-up: arg 2: " + "expected native of type *mobile.TouchEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(mobile.Touchable)//touch-up: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.TouchUp(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(repository.CopyableRepository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.CopyableRepository)//can-read": { + Doc: "repository.CopyableRepository.CanRead", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.CopyableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_CopyableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//can-read: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.CopyableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//can-read: arg 1: " + "expected native of type repository.CopyableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//can-read: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//can-read: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//can-read: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//can-read: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//can-read: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//can-read: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.CanRead(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.copyableRepository) + // * 1 - Go(fyne.URI) + // * 2 - Go(fyne.URI) + // Result: + // * error + "Go(repository.CopyableRepository)//copy": { + Doc: "repository.CopyableRepository.Copy", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.CopyableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_CopyableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//copy: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.CopyableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//copy: arg 1: " + "expected native of type repository.CopyableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//copy: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//copy: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//copy: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//copy: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//copy: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//copy: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.URI + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//copy: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//copy: arg 3: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//copy: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//copy: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Copy(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(repository.CopyableRepository) + // * 1 - string + "Go(repository.CopyableRepository)//destroy": { + Doc: "repository.CopyableRepository.Destroy", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.CopyableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_CopyableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//destroy: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.CopyableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//destroy: arg 1: " + "expected native of type repository.CopyableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//destroy: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//destroy: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//destroy: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.Destroy(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(repository.CopyableRepository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.CopyableRepository)//exists": { + Doc: "repository.CopyableRepository.Exists", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.CopyableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_CopyableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//exists: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.CopyableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//exists: arg 1: " + "expected native of type repository.CopyableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//exists: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//exists: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//exists: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//exists: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//exists: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//exists: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Exists(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.CopyableRepository) + // * u - Go(fyne.URI) + // Result: + // * Go(fyne.URIReadCloser) + // * error + "Go(repository.CopyableRepository)//reader": { + Doc: "repository.CopyableRepository.Reader", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.CopyableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_CopyableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//reader: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.CopyableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//reader: arg 1: " + "expected native of type repository.CopyableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//reader: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//reader: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//reader: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//reader: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//reader: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CopyableRepository)//reader: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Reader(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URIReadCloser)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.CustomURIRepository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.CustomURIRepository)//can-read": { + Doc: "repository.CustomURIRepository.CanRead", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.CustomURIRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_CustomURIRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//can-read: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.CustomURIRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//can-read: arg 1: " + "expected native of type repository.CustomURIRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//can-read: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//can-read: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//can-read: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//can-read: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//can-read: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//can-read: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.CanRead(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.CustomURIRepository) + // * 1 - string + "Go(repository.CustomURIRepository)//destroy": { + Doc: "repository.CustomURIRepository.Destroy", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.CustomURIRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_CustomURIRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//destroy: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.CustomURIRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//destroy: arg 1: " + "expected native of type repository.CustomURIRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//destroy: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//destroy: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//destroy: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.Destroy(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(repository.CustomURIRepository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.CustomURIRepository)//exists": { + Doc: "repository.CustomURIRepository.Exists", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.CustomURIRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_CustomURIRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//exists: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.CustomURIRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//exists: arg 1: " + "expected native of type repository.CustomURIRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//exists: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//exists: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//exists: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//exists: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//exists: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//exists: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Exists(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.CustomURIRepository) + // * 1 - string + // Result: + // * Go(fyne.URI) + // * error + "Go(repository.CustomURIRepository)//parse-uri": { + Doc: "repository.CustomURIRepository.ParseURI", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.CustomURIRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_CustomURIRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//parse-uri: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.CustomURIRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//parse-uri: arg 1: " + "expected native of type repository.CustomURIRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//parse-uri: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//parse-uri: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//parse-uri: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := arg0Val.ParseURI(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.CustomURIRepository) + // * u - Go(fyne.URI) + // Result: + // * Go(fyne.URIReadCloser) + // * error + "Go(repository.CustomURIRepository)//reader": { + Doc: "repository.CustomURIRepository.Reader", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.CustomURIRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_CustomURIRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//reader: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.CustomURIRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//reader: arg 1: " + "expected native of type repository.CustomURIRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//reader: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//reader: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//reader: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//reader: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//reader: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.CustomURIRepository)//reader: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Reader(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URIReadCloser)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.HierarchicalRepository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.HierarchicalRepository)//can-read": { + Doc: "repository.HierarchicalRepository.CanRead", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.HierarchicalRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_HierarchicalRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//can-read: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.HierarchicalRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//can-read: arg 1: " + "expected native of type repository.HierarchicalRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//can-read: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//can-read: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//can-read: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//can-read: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//can-read: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//can-read: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.CanRead(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.HierarchicalRepository) + // * 1 - Go(fyne.URI) + // * 2 - string + // Result: + // * Go(fyne.URI) + // * error + "Go(repository.HierarchicalRepository)//child": { + Doc: "repository.HierarchicalRepository.Child", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.HierarchicalRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_HierarchicalRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//child: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.HierarchicalRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//child: arg 1: " + "expected native of type repository.HierarchicalRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//child: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//child: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//child: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//child: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//child: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//child: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//child: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + res0, resErr := arg0Val.Child(arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.HierarchicalRepository) + // * 1 - string + "Go(repository.HierarchicalRepository)//destroy": { + Doc: "repository.HierarchicalRepository.Destroy", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.HierarchicalRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_HierarchicalRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//destroy: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.HierarchicalRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//destroy: arg 1: " + "expected native of type repository.HierarchicalRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//destroy: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//destroy: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//destroy: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.Destroy(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(repository.HierarchicalRepository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.HierarchicalRepository)//exists": { + Doc: "repository.HierarchicalRepository.Exists", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.HierarchicalRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_HierarchicalRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//exists: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.HierarchicalRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//exists: arg 1: " + "expected native of type repository.HierarchicalRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//exists: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//exists: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//exists: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//exists: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//exists: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//exists: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Exists(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.HierarchicalRepository) + // * 1 - Go(fyne.URI) + // Result: + // * Go(fyne.URI) + // * error + "Go(repository.HierarchicalRepository)//parent": { + Doc: "repository.HierarchicalRepository.Parent", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.HierarchicalRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_HierarchicalRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//parent: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.HierarchicalRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//parent: arg 1: " + "expected native of type repository.HierarchicalRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//parent: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//parent: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//parent: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//parent: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//parent: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//parent: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Parent(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.HierarchicalRepository) + // * u - Go(fyne.URI) + // Result: + // * Go(fyne.URIReadCloser) + // * error + "Go(repository.HierarchicalRepository)//reader": { + Doc: "repository.HierarchicalRepository.Reader", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.HierarchicalRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_HierarchicalRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//reader: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.HierarchicalRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//reader: arg 1: " + "expected native of type repository.HierarchicalRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//reader: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//reader: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//reader: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//reader: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//reader: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.HierarchicalRepository)//reader: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Reader(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URIReadCloser)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.ListableRepository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.ListableRepository)//can-list": { + Doc: "repository.ListableRepository.CanList", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.ListableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_ListableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-list: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.ListableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-list: arg 1: " + "expected native of type repository.ListableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-list: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-list: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-list: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-list: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.CanList(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.ListableRepository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.ListableRepository)//can-read": { + Doc: "repository.ListableRepository.CanRead", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.ListableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_ListableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-read: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.ListableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-read: arg 1: " + "expected native of type repository.ListableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-read: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-read: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-read: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-read: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-read: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//can-read: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.CanRead(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.ListableRepository) + // * u - Go(fyne.URI) + // Result: + // * error + "Go(repository.ListableRepository)//create-listable": { + Doc: "repository.ListableRepository.CreateListable", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.ListableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_ListableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//create-listable: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.ListableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//create-listable: arg 1: " + "expected native of type repository.ListableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//create-listable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//create-listable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//create-listable: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//create-listable: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//create-listable: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//create-listable: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.CreateListable(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(repository.ListableRepository) + // * 1 - string + "Go(repository.ListableRepository)//destroy": { + Doc: "repository.ListableRepository.Destroy", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.ListableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_ListableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//destroy: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.ListableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//destroy: arg 1: " + "expected native of type repository.ListableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//destroy: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//destroy: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//destroy: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.Destroy(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(repository.ListableRepository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.ListableRepository)//exists": { + Doc: "repository.ListableRepository.Exists", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.ListableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_ListableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//exists: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.ListableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//exists: arg 1: " + "expected native of type repository.ListableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//exists: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//exists: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//exists: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//exists: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//exists: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//exists: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Exists(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.listableRepository) + // * u - Go(fyne.URI) + // Result: + // * block[Go(fyne.URI)] + // * error + "Go(repository.ListableRepository)//list": { + Doc: "repository.ListableRepository.List", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.ListableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_ListableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//list: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.ListableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//list: arg 1: " + "expected native of type repository.ListableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//list: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//list: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//list: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//list: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.List(arg1Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.URI)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.ListableRepository) + // * u - Go(fyne.URI) + // Result: + // * Go(fyne.URIReadCloser) + // * error + "Go(repository.ListableRepository)//reader": { + Doc: "repository.ListableRepository.Reader", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.ListableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_ListableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//reader: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.ListableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//reader: arg 1: " + "expected native of type repository.ListableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//reader: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//reader: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//reader: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//reader: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//reader: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.ListableRepository)//reader: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Reader(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URIReadCloser)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.MovableRepository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.MovableRepository)//can-read": { + Doc: "repository.MovableRepository.CanRead", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.MovableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_MovableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//can-read: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.MovableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//can-read: arg 1: " + "expected native of type repository.MovableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//can-read: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//can-read: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//can-read: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//can-read: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//can-read: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//can-read: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.CanRead(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.MovableRepository) + // * 1 - string + "Go(repository.MovableRepository)//destroy": { + Doc: "repository.MovableRepository.Destroy", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.MovableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_MovableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//destroy: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.MovableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//destroy: arg 1: " + "expected native of type repository.MovableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//destroy: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//destroy: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//destroy: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.Destroy(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(repository.MovableRepository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.MovableRepository)//exists": { + Doc: "repository.MovableRepository.Exists", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.MovableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_MovableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//exists: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.MovableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//exists: arg 1: " + "expected native of type repository.MovableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//exists: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//exists: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//exists: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//exists: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//exists: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//exists: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Exists(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.MovableRepository) + // * 1 - Go(fyne.URI) + // * 2 - Go(fyne.URI) + // Result: + // * error + "Go(repository.MovableRepository)//move": { + Doc: "repository.MovableRepository.Move", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.MovableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_MovableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//move: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.MovableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//move: arg 1: " + "expected native of type repository.MovableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//move: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//move: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//move: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.URI + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//move: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//move: arg 3: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//move: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//move: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Move(arg1Val, arg2Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(repository.MovableRepository) + // * u - Go(fyne.URI) + // Result: + // * Go(fyne.URIReadCloser) + // * error + "Go(repository.MovableRepository)//reader": { + Doc: "repository.MovableRepository.Reader", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.MovableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_MovableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//reader: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.MovableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//reader: arg 1: " + "expected native of type repository.MovableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//reader: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//reader: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//reader: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//reader: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//reader: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.MovableRepository)//reader: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Reader(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URIReadCloser)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.Repository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.Repository)//can-read": { + Doc: "repository.Repository.CanRead", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.Repository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_Repository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//can-read: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.Repository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//can-read: arg 1: " + "expected native of type repository.Repository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//can-read: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//can-read: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//can-read: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//can-read: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//can-read: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//can-read: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.CanRead(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.Repository) + // * 1 - string + "Go(repository.Repository)//destroy": { + Doc: "repository.Repository.Destroy", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.Repository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_Repository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//destroy: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.Repository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//destroy: arg 1: " + "expected native of type repository.Repository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//destroy: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//destroy: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//destroy: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.Destroy(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(repository.Repository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.Repository)//exists": { + Doc: "repository.Repository.Exists", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.Repository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_Repository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//exists: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.Repository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//exists: arg 1: " + "expected native of type repository.Repository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//exists: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//exists: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//exists: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//exists: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//exists: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//exists: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Exists(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.Repository) + // * u - Go(fyne.URI) + // Result: + // * Go(fyne.URIReadCloser) + // * error + "Go(repository.Repository)//reader": { + Doc: "repository.Repository.Reader", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.Repository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_Repository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//reader: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.Repository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//reader: arg 1: " + "expected native of type repository.Repository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//reader: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//reader: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//reader: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//reader: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//reader: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.Repository)//reader: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Reader(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URIReadCloser)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.WritableRepository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.WritableRepository)//can-read": { + Doc: "repository.WritableRepository.CanRead", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.WritableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_WritableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-read: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.WritableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-read: arg 1: " + "expected native of type repository.WritableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-read: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-read: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-read: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-read: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-read: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-read: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.CanRead(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.WritableRepository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.WritableRepository)//can-write": { + Doc: "repository.WritableRepository.CanWrite", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.WritableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_WritableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-write: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.WritableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-write: arg 1: " + "expected native of type repository.WritableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-write: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-write: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-write: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-write: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-write: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//can-write: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.CanWrite(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.WritableRepository) + // * u - Go(fyne.URI) + // Result: + // * error + "Go(repository.WritableRepository)//delete": { + Doc: "repository.WritableRepository.Delete", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.WritableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_WritableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//delete: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.WritableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//delete: arg 1: " + "expected native of type repository.WritableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//delete: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//delete: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//delete: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//delete: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//delete: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//delete: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := arg0Val.Delete(arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return arg0 + }, + }, + // Args: + // * recv - Go(repository.WritableRepository) + // * 1 - string + "Go(repository.WritableRepository)//destroy": { + Doc: "repository.WritableRepository.Destroy", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.WritableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_WritableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//destroy: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.WritableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//destroy: arg 1: " + "expected native of type repository.WritableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//destroy: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//destroy: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//destroy: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.Destroy(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(repository.WritableRepository) + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "Go(repository.WritableRepository)//exists": { + Doc: "repository.WritableRepository.Exists", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.WritableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_WritableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//exists: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.WritableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//exists: arg 1: " + "expected native of type repository.WritableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//exists: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//exists: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//exists: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//exists: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//exists: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//exists: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Exists(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.WritableRepository) + // * u - Go(fyne.URI) + // Result: + // * Go(fyne.URIReadCloser) + // * error + "Go(repository.WritableRepository)//reader": { + Doc: "repository.WritableRepository.Reader", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.WritableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_WritableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//reader: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.WritableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//reader: arg 1: " + "expected native of type repository.WritableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//reader: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//reader: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//reader: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//reader: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//reader: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//reader: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Reader(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URIReadCloser)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(repository.WritableRepository) + // * u - Go(fyne.URI) + // Result: + // * Go(fyne.URIWriteCloser) + // * error + "Go(repository.WritableRepository)//writer": { + Doc: "repository.WritableRepository.Writer", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val repository.WritableRepository + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_repository_WritableRepository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//writer: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.WritableRepository); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//writer: arg 1: " + "expected native of type repository.WritableRepository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//writer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//writer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//writer: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//writer: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//writer: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(repository.WritableRepository)//writer: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := arg0Val.Writer(arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URIWriteCloser)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // Args: + // * recv - Go(storage.FileFilter) + // * 1 - Go(fyne.URI) + // Result: + // * bool + "Go(storage.FileFilter)//matches": { + Doc: "storage.FileFilter.Matches", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val storage.FileFilter + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_storage_FileFilter(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(storage.FileFilter)//matches: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(storage.FileFilter); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(storage.FileFilter)//matches: arg 1: " + "expected native of type storage.FileFilter, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(storage.FileFilter)//matches: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(storage.FileFilter)//matches: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(storage.FileFilter)//matches: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(storage.FileFilter)//matches: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(storage.FileFilter)//matches: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(storage.FileFilter)//matches: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Matches(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(test.Softwarepainter) + // * 1 - Go(fyne.Canvas) + // Result: + // * Go(image.Image) + "Go(test.SoftwarePainter)//paint": { + Doc: "test.SoftwarePainter.Paint", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.SoftwarePainter + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_SoftwarePainter(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.SoftwarePainter)//paint: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.SoftwarePainter); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.SoftwarePainter)//paint: arg 1: " + "expected native of type test.SoftwarePainter, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.SoftwarePainter)//paint: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.SoftwarePainter)//paint: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Canvas + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.SoftwarePainter)//paint: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.SoftwarePainter)//paint: arg 2: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.SoftwarePainter)//paint: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.SoftwarePainter)//paint: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Paint(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(image.Image)") + return res0Obj + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // * shortcut - Go(fyne.Shortcut) + // * handler - fn { Go(fyne.Shortcut) } + "Go(test.WindowlessCanvas)//add-shortcut": { + Doc: "test.WindowlessCanvas.AddShortcut", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//add-shortcut: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//add-shortcut: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//add-shortcut: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//add-shortcut: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Shortcut + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Shortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//add-shortcut: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Shortcut); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//add-shortcut: arg 2: " + "expected native of type fyne.Shortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//add-shortcut: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//add-shortcut: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val func(fyne.Shortcut) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//add-shortcut: arg 3: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 fyne.Shortcut) { + var farg0Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.Shortcut)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//add-shortcut: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//add-shortcut: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.AddShortcut(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // Result: + // * Go(image.Image) + "Go(test.WindowlessCanvas)//capture": { + Doc: "test.WindowlessCanvas.Capture", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//capture: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//capture: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//capture: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//capture: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Capture() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(image.Image)") + return res0Obj + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // Result: + // * Go(fyne.CanvasObject) + "Go(test.WindowlessCanvas)//content": { + Doc: "test.WindowlessCanvas.Content", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//content: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//content: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Content() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // * 1 - Go(fyne.focusable) + "Go(test.WindowlessCanvas)//focus": { + Doc: "test.WindowlessCanvas.Focus", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Focusable + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Focusable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Focusable); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus: arg 2: " + "expected native of type fyne.Focusable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Focus(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + "Go(test.WindowlessCanvas)//focus-next": { + Doc: "test.WindowlessCanvas.FocusNext", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus-next: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus-next: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus-next: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus-next: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusNext() + return arg0 + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + "Go(test.WindowlessCanvas)//focus-previous": { + Doc: "test.WindowlessCanvas.FocusPrevious", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus-previous: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus-previous: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus-previous: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focus-previous: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.FocusPrevious() + return arg0 + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // Result: + // * Go(fyne.Focusable) + "Go(test.WindowlessCanvas)//focused": { + Doc: "test.WindowlessCanvas.Focused", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focused: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focused: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focused: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//focused: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Focused() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Focusable)") + return res0Obj + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // Result: + // [ + // Go(fyne.Position) + // Go(fyne.Size) + // ] + "Go(test.WindowlessCanvas)//interactive-area": { + Doc: "test.WindowlessCanvas.InteractiveArea", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//interactive-area: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//interactive-area: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//interactive-area: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//interactive-area: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1 := arg0Val.InteractiveArea() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + var res1Obj env.Object + res1Obj = *env.NewNative(ps.Idx, &res1, "Go(*fyne.Size)") + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // Result: + // * fn { Go(*fyne.KeyEvent) } + "Go(test.WindowlessCanvas)//on-typed-key": { + Doc: "test.WindowlessCanvas.OnTypedKey", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//on-typed-key: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//on-typed-key: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//on-typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//on-typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.OnTypedKey() + var res0Obj env.Object + res0Obj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.KeyEvent + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.KeyEvent); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//on-typed-key: arg 1: " + "expected native of type *fyne.KeyEvent, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//on-typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//on-typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0(arg0Val) + return nil + }, 1, false, false, "Returned func") + return res0Obj + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // Result: + // * fn { Go(rune) } + "Go(test.WindowlessCanvas)//on-typed-rune": { + Doc: "test.WindowlessCanvas.OnTypedRune", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//on-typed-rune: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//on-typed-rune: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//on-typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//on-typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.OnTypedRune() + var res0Obj env.Object + res0Obj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val rune + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(rune); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//on-typed-rune: arg 1: " + "expected native of type rune, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//on-typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0(arg0Val) + return nil + }, 1, false, false, "Returned func") + return res0Obj + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // Result: + // * Go(fyne.OverlayStack) + "Go(test.WindowlessCanvas)//overlays": { + Doc: "test.WindowlessCanvas.Overlays", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//overlays: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//overlays: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//overlays: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//overlays: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Overlays() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.OverlayStack)") + return res0Obj + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // Result: + // * bool + "Go(test.WindowlessCanvas)//padded": { + Doc: "test.WindowlessCanvas.Padded", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//padded: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//padded: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//padded: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//padded: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Padded() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // * 1 - Go(fyne.Position) + // Result: + // [ + // integer + // integer + // ] + "Go(test.WindowlessCanvas)//pixel-coordinate-for-position": { + Doc: "test.WindowlessCanvas.PixelCoordinateForPosition", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//pixel-coordinate-for-position: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//pixel-coordinate-for-position: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//pixel-coordinate-for-position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//pixel-coordinate-for-position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//pixel-coordinate-for-position: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//pixel-coordinate-for-position: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, res1 := arg0Val.PixelCoordinateForPosition(arg1Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(int64(res0)) + var res1Obj env.Object + res1Obj = *env.NewInteger(int64(res1)) + return *env.NewBlock(*env.NewTSeries([]env.Object{ + res0Obj, + res1Obj, + })) + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // * 1 - Go(fyne.CanvasObject) + "Go(test.WindowlessCanvas)//refresh": { + Doc: "test.WindowlessCanvas.Refresh", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//refresh: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//refresh: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//refresh: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//refresh: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//refresh: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//refresh: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Refresh(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // * shortcut - Go(fyne.Shortcut) + "Go(test.WindowlessCanvas)//remove-shortcut": { + Doc: "test.WindowlessCanvas.RemoveShortcut", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//remove-shortcut: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//remove-shortcut: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//remove-shortcut: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//remove-shortcut: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Shortcut + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Shortcut(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//remove-shortcut: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Shortcut); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//remove-shortcut: arg 2: " + "expected native of type fyne.Shortcut, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//remove-shortcut: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//remove-shortcut: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.RemoveShortcut(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // * 1 - Go(fyne.Size) + "Go(test.WindowlessCanvas)//resize": { + Doc: "test.WindowlessCanvas.Resize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//resize: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//resize: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//resize: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//resize: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//resize: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//resize: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Resize(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // Result: + // * decimal + "Go(test.WindowlessCanvas)//scale": { + Doc: "test.WindowlessCanvas.Scale", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//scale: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//scale: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//scale: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//scale: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Scale() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // * 1 - Go(fyne.CanvasObject) + "Go(test.WindowlessCanvas)//set-content": { + Doc: "test.WindowlessCanvas.SetContent", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-content: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-content: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-content: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-content: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-content: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-content: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-content: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-content: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.SetContent(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // * 1 - fn { Go(*fyne.KeyEvent) } + "Go(test.WindowlessCanvas)//set-on-typed-key": { + Doc: "test.WindowlessCanvas.SetOnTypedKey", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-on-typed-key: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-on-typed-key: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-on-typed-key: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-on-typed-key: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(*fyne.KeyEvent) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-on-typed-key: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 *fyne.KeyEvent) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(*fyne.KeyEvent)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-on-typed-key: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-on-typed-key: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnTypedKey(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // * 1 - fn { Go(rune) } + "Go(test.WindowlessCanvas)//set-on-typed-rune": { + Doc: "test.WindowlessCanvas.SetOnTypedRune", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-on-typed-rune: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-on-typed-rune: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-on-typed-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-on-typed-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(rune) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-on-typed-rune: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 rune) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(rune)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-on-typed-rune: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-on-typed-rune: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + arg0Val.SetOnTypedRune(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // * 1 - bool + "Go(test.WindowlessCanvas)//set-padded": { + Doc: "test.WindowlessCanvas.SetPadded", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-padded: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-padded: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-padded: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-padded: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val bool + if vc, ok := arg1.(env.Integer); ok { + arg1Val = vc.Value != 0 + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-padded: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetPadded(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // * 1 - decimal + "Go(test.WindowlessCanvas)//set-scale": { + Doc: "test.WindowlessCanvas.SetScale", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-scale: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-scale: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-scale: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-scale: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val float32 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//set-scale: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + arg0Val.SetScale(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + // Result: + // * Go(fyne.size) + "Go(test.WindowlessCanvas)//size": { + Doc: "test.WindowlessCanvas.Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//size: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//size: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//size: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//size: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Size() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // Args: + // * recv - Go(test.WindowlessCanvas) + "Go(test.WindowlessCanvas)//unfocus": { + Doc: "test.WindowlessCanvas.Unfocus", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.WindowlessCanvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_WindowlessCanvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//unfocus: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.WindowlessCanvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//unfocus: arg 1: " + "expected native of type test.WindowlessCanvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//unfocus: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(test.WindowlessCanvas)//unfocus: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unfocus() + return arg0 + }, + }, + // Args: + // * recv - Go(widget.RichTextBlock) + // Result: + // * block[Go(widget.RichTextSegment)] + "Go(widget.RichTextBlock)//segments": { + Doc: "widget.RichTextBlock.Segments", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.RichTextBlock + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_widget_RichTextBlock(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextBlock)//segments: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.RichTextBlock); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextBlock)//segments: arg 1: " + "expected native of type widget.RichTextBlock, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextBlock)//segments: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextBlock)//segments: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Segments() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(widget.RichTextSegment)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // Args: + // * recv - Go(widget.RichTextSegment) + // Result: + // * bool + "Go(widget.RichTextSegment)//inline": { + Doc: "widget.RichTextSegment.Inline", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.RichTextSegment + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_widget_RichTextSegment(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//inline: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.RichTextSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//inline: arg 1: " + "expected native of type widget.RichTextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//inline: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//inline: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Inline() + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Args: + // * recv - Go(widget.RichTextSegment) + // * pos-1 - Go(fyne.Position) + // * pos-2 - Go(fyne.Position) + "Go(widget.RichTextSegment)//select": { + Doc: "widget.RichTextSegment.Select", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.RichTextSegment + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_widget_RichTextSegment(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//select: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.RichTextSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//select: arg 1: " + "expected native of type widget.RichTextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//select: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//select: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//select: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//select: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Position + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//select: arg 3: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//select: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Select(arg1Val, arg2Val) + return arg0 + }, + }, + // Args: + // * recv - Go(widget.RichTextSegment) + // Result: + // * string + "Go(widget.RichTextSegment)//selected-text": { + Doc: "widget.RichTextSegment.SelectedText", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.RichTextSegment + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_widget_RichTextSegment(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//selected-text: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.RichTextSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//selected-text: arg 1: " + "expected native of type widget.RichTextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//selected-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//selected-text: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.SelectedText() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(widget.RichTextSegment) + // Result: + // * string + "Go(widget.RichTextSegment)//textual": { + Doc: "widget.RichTextSegment.Textual", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.RichTextSegment + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_widget_RichTextSegment(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//textual: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.RichTextSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//textual: arg 1: " + "expected native of type widget.RichTextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//textual: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//textual: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Textual() + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // Args: + // * recv - Go(widget.RichTextSegment) + "Go(widget.RichTextSegment)//unselect": { + Doc: "widget.RichTextSegment.Unselect", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.RichTextSegment + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_widget_RichTextSegment(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//unselect: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.RichTextSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//unselect: arg 1: " + "expected native of type widget.RichTextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//unselect: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//unselect: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Unselect() + return arg0 + }, + }, + // Args: + // * recv - Go(widget.RichTextSegment) + // * 1 - Go(fyne.CanvasObject) + "Go(widget.RichTextSegment)//update": { + Doc: "widget.RichTextSegment.Update", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.RichTextSegment + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_widget_RichTextSegment(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//update: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.RichTextSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//update: arg 1: " + "expected native of type widget.RichTextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//update: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//update: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//update: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//update: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//update: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//update: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val.Update(arg1Val) + return arg0 + }, + }, + // Args: + // * recv - Go(widget.RichTextSegment) + // Result: + // * Go(fyne.CanvasObject) + "Go(widget.RichTextSegment)//visual": { + Doc: "widget.RichTextSegment.Visual", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.RichTextSegment + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_widget_RichTextSegment(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//visual: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.RichTextSegment); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//visual: arg 1: " + "expected native of type widget.RichTextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//visual: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(widget.RichTextSegment)//visual: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Visual() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // Args: + // * recv - Go(widget.TextGridStyle) + // Result: + // * Go(color.Color) + "Go(widget.TextGridStyle)//background-color": { + Doc: "widget.TextGridStyle.BackgroundColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.TextGridStyle + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_widget_TextGridStyle(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(widget.TextGridStyle)//background-color: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.TextGridStyle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(widget.TextGridStyle)//background-color: arg 1: " + "expected native of type widget.TextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(widget.TextGridStyle)//background-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(widget.TextGridStyle)//background-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.BackgroundColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * recv - Go(widget.TextGridstyle) + // Result: + // * Go(fyne.Textstyle) + "Go(widget.TextGridStyle)//style": { + Doc: "widget.TextGridStyle.Style", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.TextGridStyle + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_widget_TextGridStyle(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(widget.TextGridStyle)//style: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.TextGridStyle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(widget.TextGridStyle)//style: arg 1: " + "expected native of type widget.TextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(widget.TextGridStyle)//style: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(widget.TextGridStyle)//style: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.Style() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.TextStyle)") + return res0Obj + }, + }, + // Args: + // * recv - Go(widget.TextGridStyle) + // Result: + // * Go(color.Color) + "Go(widget.TextGridStyle)//text-color": { + Doc: "widget.TextGridStyle.TextColor", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.TextGridStyle + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_widget_TextGridStyle(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(widget.TextGridStyle)//text-color: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.TextGridStyle); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(widget.TextGridStyle)//text-color: arg 1: " + "expected native of type widget.TextGridStyle, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(widget.TextGridStyle)//text-color: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(widget.TextGridStyle)//text-color: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.TextColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Args: + // * recv - Go(widget.ToolbarItem) + // Result: + // * Go(fyne.CanvasObject) + "Go(widget.ToolbarItem)//toolbar-object": { + Doc: "widget.ToolbarItem.ToolbarObject", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val widget.ToolbarItem + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_widget_ToolbarItem(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("Go(widget.ToolbarItem)//toolbar-object: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.ToolbarItem); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("Go(widget.ToolbarItem)//toolbar-object: arg 1: " + "expected native of type widget.ToolbarItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("Go(widget.ToolbarItem)//toolbar-object: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("Go(widget.ToolbarItem)//toolbar-object: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := arg0Val.ToolbarObject() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // app returns a new application instance with the default driver and no unique ID (unless specified in FyneApp.toml) + // + // Result: + // * Go(fyne.App) + "app": { + Doc: "app.New", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := app.New() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.App)") + return res0Obj + }, + }, + "settings-schema": { + Doc: "Create a new app.SettingsSchema struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &app.SettingsSchema{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*app.SettingsSchema)") + return resObj + }, + }, + // with-id returns a new app instance using the appropriate runtime driver. + // The ID string should be globally unique to this app. + // + // Args: + // * id - string + // Result: + // * Go(fyne.App) + "with-id": { + Doc: "app.NewWithID", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("with-id: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := app.NewWithID(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.App)") + return res0Obj + }, + }, + // set-metadata overrides the packaged application metadata. + // This data can be used in many places like notifications and about screens. + // + // Args: + // * m - Go(fyne.AppMetadata) + "set-metadata": { + Doc: "app.SetMetadata", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.AppMetadata + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.AppMetadata); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("set-metadata: arg 1: " + "expected native of type *fyne.AppMetadata, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("set-metadata: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + app.SetMetadata(arg0Val) + return nil + }, + }, + // binding-and returns a Bool binding that return true when all the passed Bool binding are + // true and false otherwise. It does apply a logical and boolean operation on all passed + // Bool bindings. This binding is two way. In case of a Set, it will propagate the value + // identically to all the Bool bindings used for its construction. + // + // Since 2.4 + // + // Args: + // * data - block[Go(binding.Bool)] + // Result: + // * Go(binding.Bool) + "binding-and": { + Doc: "binding.And", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []binding.Bool + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]binding.Bool, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_binding_Bool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-and: arg 1: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Bool); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-and: arg 1: " + "block item: " + "expected native of type binding.Bool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-and: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("binding-and: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-and: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-and: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.And(arg0Val...) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Bool)") + return res0Obj + }, + }, + // binding-bind-bool returns a new bindable value that controls the contents of the provided bool variable. + // If your code changes the content of the variable this refers to you should call Reload() to inform the bindings. + // + // Since: 2.0 + // + // Args: + // * v - *bool + // Result: + // * Go(binding.ExternalBool) + "binding-bind-bool": { + Doc: "binding.BindBool", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *bool + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*bool); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-bool: arg 1: " + "expected native of type *bool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-bool: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-bool: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindBool(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalBool)") + return res0Obj + }, + }, + // binding-bind-bool-list returns a bound list of bool values, based on the contents of the passed slice. + // If your code changes the content of the slice this refers to you should call Reload() to inform the bindings. + // + // Since: 2.0 + // + // Args: + // * v - *block[bool] + // Result: + // * Go(binding.ExternalBoolList) + "binding-bind-bool-list": { + Doc: "binding.BindBoolList", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *[]bool + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*[]bool); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-bool-list: arg 1: " + "expected native of type *[]bool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-bool-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-bool-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindBoolList(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalBoolList)") + return res0Obj + }, + }, + // binding-bind-bool-tree returns a bound tree of bool values, based on the contents of the passed values. + // The ids map specifies how each item relates to its parent (with id ""), with the values being in the v map. + // If your code changes the content of the maps this refers to you should call Reload() to inform the bindings. + // + // Since: 2.4 + // + // Args: + // * ids - *dict[string, block[string]] + // * v - *dict[string, bool] + // Result: + // * Go(binding.ExternalBoolTree) + "binding-bind-bool-tree": { + Doc: "binding.BindBoolTree", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *map[string][]string + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string][]string); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-bool-tree: arg 1: " + "expected native of type *map[string][]string, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-bool-tree: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-bool-tree: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *map[string]bool + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string]bool); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-bool-tree: arg 2: " + "expected native of type *map[string]bool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-bool-tree: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-bool-tree: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindBoolTree(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalBoolTree)") + return res0Obj + }, + }, + // binding-bind-bytes returns a new bindable value that controls the contents of the provided []byte variable. + // If your code changes the content of the variable this refers to you should call Reload() to inform the bindings. + // + // Since: 2.2 + // + // Args: + // * v - *block[integer] + // Result: + // * Go(binding.ExternalBytes) + "binding-bind-bytes": { + Doc: "binding.BindBytes", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *[]byte + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*[]byte); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-bytes: arg 1: " + "expected native of type *[]byte, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-bytes: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-bytes: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindBytes(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalBytes)") + return res0Obj + }, + }, + // binding-bind-bytes-list returns a bound list of []byte values, based on the contents of the passed slice. + // If your code changes the content of the slice this refers to you should call Reload() to inform the bindings. + // + // Since: 2.2 + // + // Args: + // * v - *block[block[integer]] + // Result: + // * Go(binding.ExternalBytesList) + "binding-bind-bytes-list": { + Doc: "binding.BindBytesList", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *[][]byte + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*[][]byte); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-bytes-list: arg 1: " + "expected native of type *[][]byte, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-bytes-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-bytes-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindBytesList(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalBytesList)") + return res0Obj + }, + }, + // binding-bind-bytes-tree returns a bound tree of []byte values, based on the contents of the passed values. + // The ids map specifies how each item relates to its parent (with id ""), with the values being in the v map. + // If your code changes the content of the maps this refers to you should call Reload() to inform the bindings. + // + // Since: 2.4 + // + // Args: + // * ids - *dict[string, block[string]] + // * v - *dict[string, block[integer]] + // Result: + // * Go(binding.ExternalBytesTree) + "binding-bind-bytes-tree": { + Doc: "binding.BindBytesTree", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *map[string][]string + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string][]string); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-bytes-tree: arg 1: " + "expected native of type *map[string][]string, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-bytes-tree: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-bytes-tree: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *map[string][]byte + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string][]byte); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-bytes-tree: arg 2: " + "expected native of type *map[string][]byte, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-bytes-tree: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-bytes-tree: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindBytesTree(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalBytesTree)") + return res0Obj + }, + }, + // binding-bind-float returns a new bindable value that controls the contents of the provided float64 variable. + // If your code changes the content of the variable this refers to you should call Reload() to inform the bindings. + // + // Since: 2.0 + // + // Args: + // * v - *decimal + // Result: + // * Go(binding.ExternalFloat) + "binding-bind-float": { + Doc: "binding.BindFloat", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *float64 + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*float64); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-float: arg 1: " + "expected native of type *float64, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-float: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-float: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindFloat(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalFloat)") + return res0Obj + }, + }, + // binding-bind-float-list returns a bound list of float64 values, based on the contents of the passed slice. + // If your code changes the content of the slice this refers to you should call Reload() to inform the bindings. + // + // Since: 2.0 + // + // Args: + // * v - *block[decimal] + // Result: + // * Go(binding.ExternalFloatList) + "binding-bind-float-list": { + Doc: "binding.BindFloatList", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *[]float64 + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*[]float64); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-float-list: arg 1: " + "expected native of type *[]float64, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-float-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-float-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindFloatList(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalFloatList)") + return res0Obj + }, + }, + // binding-bind-float-tree returns a bound tree of float64 values, based on the contents of the passed values. + // The ids map specifies how each item relates to its parent (with id ""), with the values being in the v map. + // If your code changes the content of the maps this refers to you should call Reload() to inform the bindings. + // + // Since: 2.4 + // + // Args: + // * ids - *dict[string, block[string]] + // * v - *dict[string, decimal] + // Result: + // * Go(binding.ExternalFloatTree) + "binding-bind-float-tree": { + Doc: "binding.BindFloatTree", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *map[string][]string + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string][]string); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-float-tree: arg 1: " + "expected native of type *map[string][]string, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-float-tree: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-float-tree: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *map[string]float64 + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string]float64); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-float-tree: arg 2: " + "expected native of type *map[string]float64, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-float-tree: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-float-tree: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindFloatTree(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalFloatTree)") + return res0Obj + }, + }, + // binding-bind-int returns a new bindable value that controls the contents of the provided int variable. + // If your code changes the content of the variable this refers to you should call Reload() to inform the bindings. + // + // Since: 2.0 + // + // Args: + // * v - *integer + // Result: + // * Go(binding.ExternalInt) + "binding-bind-int": { + Doc: "binding.BindInt", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *int + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*int); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-int: arg 1: " + "expected native of type *int, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-int: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-int: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindInt(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalInt)") + return res0Obj + }, + }, + // binding-bind-int-list returns a bound list of int values, based on the contents of the passed slice. + // If your code changes the content of the slice this refers to you should call Reload() to inform the bindings. + // + // Since: 2.0 + // + // Args: + // * v - *block[integer] + // Result: + // * Go(binding.ExternalIntList) + "binding-bind-int-list": { + Doc: "binding.BindIntList", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *[]int + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*[]int); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-int-list: arg 1: " + "expected native of type *[]int, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-int-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-int-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindIntList(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalIntList)") + return res0Obj + }, + }, + // binding-bind-int-tree returns a bound tree of int values, based on the contents of the passed values. + // The ids map specifies how each item relates to its parent (with id ""), with the values being in the v map. + // If your code changes the content of the maps this refers to you should call Reload() to inform the bindings. + // + // Since: 2.4 + // + // Args: + // * ids - *dict[string, block[string]] + // * v - *dict[string, integer] + // Result: + // * Go(binding.ExternalIntTree) + "binding-bind-int-tree": { + Doc: "binding.BindIntTree", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *map[string][]string + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string][]string); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-int-tree: arg 1: " + "expected native of type *map[string][]string, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-int-tree: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-int-tree: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *map[string]int + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string]int); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-int-tree: arg 2: " + "expected native of type *map[string]int, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-int-tree: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-int-tree: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindIntTree(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalIntTree)") + return res0Obj + }, + }, + // binding-bind-preference-bool returns a bindable bool value that is managed by the application preferences. + // Changes to this value will be saved to application storage and when the app starts the previous values will be read. + // + // Since: 2.0 + // + // Args: + // * key - string + // * p - Go(fyne.Preferences) + // Result: + // * Go(binding.Bool) + "binding-bind-preference-bool": { + Doc: "binding.BindPreferenceBool", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-bool: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val fyne.Preferences + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-bool: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-bool: arg 2: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-bool: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-preference-bool: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindPreferenceBool(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Bool)") + return res0Obj + }, + }, + // binding-bind-preference-float returns a bindable float64 value that is managed by the application preferences. + // Changes to this value will be saved to application storage and when the app starts the previous values will be read. + // + // Since: 2.0 + // + // Args: + // * key - string + // * p - Go(fyne.Preferences) + // Result: + // * Go(binding.Float) + "binding-bind-preference-float": { + Doc: "binding.BindPreferenceFloat", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-float: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val fyne.Preferences + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-float: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-float: arg 2: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-float: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-preference-float: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindPreferenceFloat(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Float)") + return res0Obj + }, + }, + // binding-bind-preference-int returns a bindable int value that is managed by the application preferences. + // Changes to this value will be saved to application storage and when the app starts the previous values will be read. + // + // Since: 2.0 + // + // Args: + // * key - string + // * p - Go(fyne.Preferences) + // Result: + // * Go(binding.Int) + "binding-bind-preference-int": { + Doc: "binding.BindPreferenceInt", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-int: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val fyne.Preferences + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-int: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-int: arg 2: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-int: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-preference-int: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindPreferenceInt(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Int)") + return res0Obj + }, + }, + // binding-bind-preference-string returns a bindable string value that is managed by the application preferences. + // Changes to this value will be saved to application storage and when the app starts the previous values will be read. + // + // Since: 2.0 + // + // Args: + // * key - string + // * p - Go(fyne.Preferences) + // Result: + // * Go(binding.String) + "binding-bind-preference-string": { + Doc: "binding.BindPreferenceString", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-string: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val fyne.Preferences + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Preferences(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-string: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Preferences); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-string: arg 2: " + "expected native of type fyne.Preferences, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-preference-string: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-preference-string: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindPreferenceString(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.String)") + return res0Obj + }, + }, + // binding-bind-rune returns a new bindable value that controls the contents of the provided rune variable. + // If your code changes the content of the variable this refers to you should call Reload() to inform the bindings. + // + // Since: 2.0 + // + // Args: + // * v - *Go(rune) + // Result: + // * Go(binding.ExternalRune) + "binding-bind-rune": { + Doc: "binding.BindRune", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *rune + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*rune); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-rune: arg 1: " + "expected native of type *rune, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-rune: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-rune: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindRune(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalRune)") + return res0Obj + }, + }, + // binding-bind-rune-list returns a bound list of rune values, based on the contents of the passed slice. + // If your code changes the content of the slice this refers to you should call Reload() to inform the bindings. + // + // Since: 2.0 + // + // Args: + // * v - *block[Go(rune)] + // Result: + // * Go(binding.ExternalRuneList) + "binding-bind-rune-list": { + Doc: "binding.BindRuneList", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *[]rune + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*[]rune); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-rune-list: arg 1: " + "expected native of type *[]rune, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-rune-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-rune-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindRuneList(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalRuneList)") + return res0Obj + }, + }, + // binding-bind-rune-tree returns a bound tree of rune values, based on the contents of the passed values. + // The ids map specifies how each item relates to its parent (with id ""), with the values being in the v map. + // If your code changes the content of the maps this refers to you should call Reload() to inform the bindings. + // + // Since: 2.4 + // + // Args: + // * ids - *dict[string, block[string]] + // * v - *dict[string, Go(rune)] + // Result: + // * Go(binding.ExternalRuneTree) + "binding-bind-rune-tree": { + Doc: "binding.BindRuneTree", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *map[string][]string + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string][]string); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-rune-tree: arg 1: " + "expected native of type *map[string][]string, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-rune-tree: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-rune-tree: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *map[string]rune + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string]rune); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-rune-tree: arg 2: " + "expected native of type *map[string]rune, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-rune-tree: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-rune-tree: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindRuneTree(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalRuneTree)") + return res0Obj + }, + }, + // binding-bind-string returns a new bindable value that controls the contents of the provided string variable. + // If your code changes the content of the variable this refers to you should call Reload() to inform the bindings. + // + // Since: 2.0 + // + // Args: + // * v - *string + // Result: + // * Go(binding.ExternalString) + "binding-bind-string": { + Doc: "binding.BindString", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *string + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*string); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-string: arg 1: " + "expected native of type *string, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-string: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-string: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindString(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalString)") + return res0Obj + }, + }, + // binding-bind-string-list returns a bound list of string values, based on the contents of the passed slice. + // If your code changes the content of the slice this refers to you should call Reload() to inform the bindings. + // + // Since: 2.0 + // + // Args: + // * v - *block[string] + // Result: + // * Go(binding.ExternalStringList) + "binding-bind-string-list": { + Doc: "binding.BindStringList", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *[]string + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*[]string); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-string-list: arg 1: " + "expected native of type *[]string, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-string-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-string-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindStringList(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalStringList)") + return res0Obj + }, + }, + // binding-bind-string-tree returns a bound tree of string values, based on the contents of the passed values. + // The ids map specifies how each item relates to its parent (with id ""), with the values being in the v map. + // If your code changes the content of the maps this refers to you should call Reload() to inform the bindings. + // + // Since: 2.4 + // + // Args: + // * ids - *dict[string, block[string]] + // * v - *dict[string, string] + // Result: + // * Go(binding.ExternalStringTree) + "binding-bind-string-tree": { + Doc: "binding.BindStringTree", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *map[string][]string + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string][]string); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-string-tree: arg 1: " + "expected native of type *map[string][]string, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-string-tree: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-string-tree: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *map[string]string + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string]string); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-string-tree: arg 2: " + "expected native of type *map[string]string, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-string-tree: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-string-tree: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindStringTree(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalStringTree)") + return res0Obj + }, + }, + // binding-bind-struct creates a new map binding of string to any using the struct passed as data. + // The key for each item is a string representation of each exported field with the value set as an any. + // Only exported fields are included. + // + // Since: 2.0 + // + // Args: + // * i - Go(any) + // Result: + // * Go(binding.Struct) + "binding-bind-struct": { + Doc: "binding.BindStruct", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val any + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-struct: arg 1: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("binding-bind-struct: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindStruct(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Struct)") + return res0Obj + }, + }, + // binding-bind-untyped returns a bindable any value that is bound to an external type. + // The parameter must be a pointer to the type you wish to bind. + // + // Since: 2.1 + // + // Args: + // * v - Go(any) + // Result: + // * Go(binding.ExternalUntyped) + "binding-bind-untyped": { + Doc: "binding.BindUntyped", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val any + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-untyped: arg 1: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("binding-bind-untyped: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindUntyped(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalUntyped)") + return res0Obj + }, + }, + // binding-bind-untyped-list returns a bound list of any values, based on the contents of the passed slice. + // If your code changes the content of the slice this refers to you should call Reload() to inform the bindings. + // + // Since: 2.1 + // + // Args: + // * v - *block[Go(any)] + // Result: + // * Go(binding.ExternalUntypedList) + "binding-bind-untyped-list": { + Doc: "binding.BindUntypedList", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *[]any + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*[]any); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-untyped-list: arg 1: " + "expected native of type *[]any, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-untyped-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-untyped-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindUntypedList(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalUntypedList)") + return res0Obj + }, + }, + // binding-bind-untyped-map creates a new map binding of string to any based on the data passed. + // If your code changes the content of the map this refers to you should call Reload() to inform the bindings. + // + // Since: 2.0 + // + // Args: + // * d - *dict[string, Go(any)] + // Result: + // * Go(binding.ExternalUntypedMap) + "binding-bind-untyped-map": { + Doc: "binding.BindUntypedMap", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *map[string]any + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string]any); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-untyped-map: arg 1: " + "expected native of type *map[string]any, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-untyped-map: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-untyped-map: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindUntypedMap(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalUntypedMap)") + return res0Obj + }, + }, + // binding-bind-untyped-tree returns a bound tree of any values, based on the contents of the passed values. + // The ids map specifies how each item relates to its parent (with id ""), with the values being in the v map. + // If your code changes the content of the maps this refers to you should call Reload() to inform the bindings. + // + // Since: 2.4 + // + // Args: + // * ids - *dict[string, block[string]] + // * v - *dict[string, Go(any)] + // Result: + // * Go(binding.ExternalUntypedTree) + "binding-bind-untyped-tree": { + Doc: "binding.BindUntypedTree", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *map[string][]string + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string][]string); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-untyped-tree: arg 1: " + "expected native of type *map[string][]string, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-untyped-tree: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-untyped-tree: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *map[string]any + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string]any); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-untyped-tree: arg 2: " + "expected native of type *map[string]any, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-untyped-tree: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-untyped-tree: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindUntypedTree(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalUntypedTree)") + return res0Obj + }, + }, + // binding-bind-uri returns a new bindable value that controls the contents of the provided fyne.URI variable. + // If your code changes the content of the variable this refers to you should call Reload() to inform the bindings. + // + // Since: 2.1 + // + // Args: + // * v - Go(*fyne.URI) + // Result: + // * Go(binding.ExternalURI) + "binding-bind-uri": { + Doc: "binding.BindURI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.URI + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-uri: arg 1: " + "expected native of type *fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-uri: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-uri: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindURI(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalURI)") + return res0Obj + }, + }, + // binding-bind-uri-list returns a bound list of fyne.URI values, based on the contents of the passed slice. + // If your code changes the content of the slice this refers to you should call Reload() to inform the bindings. + // + // Since: 2.1 + // + // Args: + // * v - *block[Go(fyne.URI)] + // Result: + // * Go(binding.ExternalURIList) + "binding-bind-uri-list": { + Doc: "binding.BindURIList", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *[]fyne.URI + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*[]fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-uri-list: arg 1: " + "expected native of type *[]fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-uri-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-uri-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindURIList(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalURIList)") + return res0Obj + }, + }, + // binding-bind-uri-tree returns a bound tree of fyne.URI values, based on the contents of the passed values. + // The ids map specifies how each item relates to its parent (with id ""), with the values being in the v map. + // If your code changes the content of the maps this refers to you should call Reload() to inform the bindings. + // + // Since: 2.4 + // + // Args: + // * ids - *dict[string, block[string]] + // * v - *dict[string, Go(fyne.URI)] + // Result: + // * Go(binding.ExternalURITree) + "binding-bind-uri-tree": { + Doc: "binding.BindURITree", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *map[string][]string + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string][]string); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-uri-tree: arg 1: " + "expected native of type *map[string][]string, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-uri-tree: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-uri-tree: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *map[string]fyne.URI + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*map[string]fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bind-uri-tree: arg 2: " + "expected native of type *map[string]fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bind-uri-tree: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bind-uri-tree: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BindURITree(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.ExternalURITree)") + return res0Obj + }, + }, + // binding-bool-to-string creates a binding that connects a Bool data item to a String. + // Changes to the Bool will be pushed to the String and setting the string will parse and set the + // Bool if the parse was successful. + // + // Since: 2.0 + // + // Args: + // * v - Go(binding.Bool) + // Result: + // * Go(binding.String) + "binding-bool-to-string": { + Doc: "binding.BoolToString", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Bool + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Bool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-bool-to-string: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Bool); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bool-to-string: arg 1: " + "expected native of type binding.Bool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bool-to-string: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bool-to-string: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.BoolToString(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.String)") + return res0Obj + }, + }, + // binding-bool-to-string-with-format creates a binding that connects a Bool data item to a String and is + // presented using the specified format. Changes to the Bool will be pushed to the String and setting + // the string will parse and set the Bool if the string matches the format and its parse was successful. + // + // Since: 2.0 + // + // Args: + // * v - Go(binding.Bool) + // * format - string + // Result: + // * Go(binding.String) + "binding-bool-to-string-with-format": { + Doc: "binding.BoolToStringWithFormat", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Bool + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Bool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-bool-to-string-with-format: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Bool); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-bool-to-string-with-format: arg 1: " + "expected native of type binding.Bool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-bool-to-string-with-format: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-bool-to-string-with-format: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("binding-bool-to-string-with-format: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := binding.BoolToStringWithFormat(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.String)") + return res0Obj + }, + }, + // Result: + // * string + "binding-data-tree-root-id": { + Doc: "Get binding.DataTreeRootID value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(binding.DataTreeRootID) + return resObj + }, + }, + // binding-float-to-int creates a binding that connects a Float data item to an Int. + // + // Since: 2.5 + // + // Args: + // * v - Go(binding.Float) + // Result: + // * Go(binding.Int) + "binding-float-to-int": { + Doc: "binding.FloatToInt", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Float + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Float(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-float-to-int: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Float); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-float-to-int: arg 1: " + "expected native of type binding.Float, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-float-to-int: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-float-to-int: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.FloatToInt(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Int)") + return res0Obj + }, + }, + // binding-float-to-string creates a binding that connects a Float data item to a String. + // Changes to the Float will be pushed to the String and setting the string will parse and set the + // Float if the parse was successful. + // + // Since: 2.0 + // + // Args: + // * v - Go(binding.Float) + // Result: + // * Go(binding.String) + "binding-float-to-string": { + Doc: "binding.FloatToString", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Float + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Float(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-float-to-string: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Float); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-float-to-string: arg 1: " + "expected native of type binding.Float, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-float-to-string: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-float-to-string: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.FloatToString(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.String)") + return res0Obj + }, + }, + // binding-float-to-string-with-format creates a binding that connects a Float data item to a String and is + // presented using the specified format. Changes to the Float will be pushed to the String and setting + // the string will parse and set the Float if the string matches the format and its parse was successful. + // + // Since: 2.0 + // + // Args: + // * v - Go(binding.Float) + // * format - string + // Result: + // * Go(binding.String) + "binding-float-to-string-with-format": { + Doc: "binding.FloatToStringWithFormat", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Float + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Float(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-float-to-string-with-format: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Float); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-float-to-string-with-format: arg 1: " + "expected native of type binding.Float, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-float-to-string-with-format: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-float-to-string-with-format: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("binding-float-to-string-with-format: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := binding.FloatToStringWithFormat(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.String)") + return res0Obj + }, + }, + // binding-int-to-float creates a binding that connects an Int data item to a Float. + // + // Since: 2.5 + // + // Args: + // * val - Go(binding.Int) + // Result: + // * Go(binding.Float) + "binding-int-to-float": { + Doc: "binding.IntToFloat", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Int + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Int(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-int-to-float: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Int); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-int-to-float: arg 1: " + "expected native of type binding.Int, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-int-to-float: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-int-to-float: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.IntToFloat(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Float)") + return res0Obj + }, + }, + // binding-int-to-string creates a binding that connects a Int data item to a String. + // Changes to the Int will be pushed to the String and setting the string will parse and set the + // Int if the parse was successful. + // + // Since: 2.0 + // + // Args: + // * v - Go(binding.Int) + // Result: + // * Go(binding.String) + "binding-int-to-string": { + Doc: "binding.IntToString", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Int + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Int(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-int-to-string: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Int); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-int-to-string: arg 1: " + "expected native of type binding.Int, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-int-to-string: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-int-to-string: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.IntToString(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.String)") + return res0Obj + }, + }, + // binding-int-to-string-with-format creates a binding that connects a Int data item to a String and is + // presented using the specified format. Changes to the Int will be pushed to the String and setting + // the string will parse and set the Int if the string matches the format and its parse was successful. + // + // Since: 2.0 + // + // Args: + // * v - Go(binding.Int) + // * format - string + // Result: + // * Go(binding.String) + "binding-int-to-string-with-format": { + Doc: "binding.IntToStringWithFormat", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Int + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Int(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-int-to-string-with-format: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Int); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-int-to-string-with-format: arg 1: " + "expected native of type binding.Int, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-int-to-string-with-format: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-int-to-string-with-format: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("binding-int-to-string-with-format: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := binding.IntToStringWithFormat(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.String)") + return res0Obj + }, + }, + // binding-bool returns a bindable bool value that is managed internally. + // + // Since: 2.0 + // + // Result: + // * Go(binding.Bool) + "binding-bool": { + Doc: "binding.NewBool", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewBool() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Bool)") + return res0Obj + }, + }, + // binding-bool-list returns a bindable list of bool values. + // + // Since: 2.0 + // + // Result: + // * Go(binding.BoolList) + "binding-bool-list": { + Doc: "binding.NewBoolList", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewBoolList() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.BoolList)") + return res0Obj + }, + }, + // binding-bool-tree returns a bindable tree of bool values. + // + // Since: 2.4 + // + // Result: + // * Go(binding.BoolTree) + "binding-bool-tree": { + Doc: "binding.NewBoolTree", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewBoolTree() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.BoolTree)") + return res0Obj + }, + }, + // binding-bytes returns a bindable []byte value that is managed internally. + // + // Since: 2.2 + // + // Result: + // * Go(binding.Bytes) + "binding-bytes": { + Doc: "binding.NewBytes", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewBytes() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Bytes)") + return res0Obj + }, + }, + // binding-bytes-list returns a bindable list of []byte values. + // + // Since: 2.2 + // + // Result: + // * Go(binding.BytesList) + "binding-bytes-list": { + Doc: "binding.NewBytesList", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewBytesList() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.BytesList)") + return res0Obj + }, + }, + // binding-bytes-tree returns a bindable tree of []byte values. + // + // Since: 2.4 + // + // Result: + // * Go(binding.BytesTree) + "binding-bytes-tree": { + Doc: "binding.NewBytesTree", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewBytesTree() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.BytesTree)") + return res0Obj + }, + }, + // binding-data-listener is a helper function that creates a new listener type from a simple callback function. + // + // Since: 2.0 + // + // Args: + // * fn - fn { } + // Result: + // * Go(binding.DataListener) + "binding-data-listener": { + Doc: "binding.NewDataListener", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val func() + switch fn := arg0.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("binding-data-listener: arg 1: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg0Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-data-listener: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-data-listener: arg 1: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := binding.NewDataListener(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.DataListener)") + return res0Obj + }, + }, + // binding-float returns a bindable float64 value that is managed internally. + // + // Since: 2.0 + // + // Result: + // * Go(binding.Float) + "binding-float": { + Doc: "binding.NewFloat", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewFloat() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Float)") + return res0Obj + }, + }, + // binding-float-list returns a bindable list of float64 values. + // + // Since: 2.0 + // + // Result: + // * Go(binding.FloatList) + "binding-float-list": { + Doc: "binding.NewFloatList", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewFloatList() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.FloatList)") + return res0Obj + }, + }, + // binding-float-tree returns a bindable tree of float64 values. + // + // Since: 2.4 + // + // Result: + // * Go(binding.FloatTree) + "binding-float-tree": { + Doc: "binding.NewFloatTree", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewFloatTree() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.FloatTree)") + return res0Obj + }, + }, + // binding-int returns a bindable int value that is managed internally. + // + // Since: 2.0 + // + // Result: + // * Go(binding.Int) + "binding-int": { + Doc: "binding.NewInt", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewInt() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Int)") + return res0Obj + }, + }, + // binding-int-list returns a bindable list of int values. + // + // Since: 2.0 + // + // Result: + // * Go(binding.IntList) + "binding-int-list": { + Doc: "binding.NewIntList", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewIntList() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.IntList)") + return res0Obj + }, + }, + // binding-int-tree returns a bindable tree of int values. + // + // Since: 2.4 + // + // Result: + // * Go(binding.IntTree) + "binding-int-tree": { + Doc: "binding.NewIntTree", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewIntTree() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.IntTree)") + return res0Obj + }, + }, + // binding-rune returns a bindable rune value that is managed internally. + // + // Since: 2.0 + // + // Result: + // * Go(binding.Rune) + "binding-rune": { + Doc: "binding.NewRune", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewRune() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Rune)") + return res0Obj + }, + }, + // binding-rune-list returns a bindable list of rune values. + // + // Since: 2.0 + // + // Result: + // * Go(binding.RuneList) + "binding-rune-list": { + Doc: "binding.NewRuneList", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewRuneList() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.RuneList)") + return res0Obj + }, + }, + // binding-rune-tree returns a bindable tree of rune values. + // + // Since: 2.4 + // + // Result: + // * Go(binding.RuneTree) + "binding-rune-tree": { + Doc: "binding.NewRuneTree", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewRuneTree() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.RuneTree)") + return res0Obj + }, + }, + // binding-sprintf returns a String binding that format its content using the + // format string and the provide additional parameter that must be other + // data bindings. This data binding use fmt.Sprintf and fmt.Scanf internally + // and will have all the same limitation as those function. + // + // Since: 2.2 + // + // Args: + // * format - string + // * b - block[Go(binding.DataItem)] + // Result: + // * Go(binding.String) + "binding-sprintf": { + Doc: "binding.NewSprintf", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("binding-sprintf: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val []binding.DataItem + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]binding.DataItem, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_binding_DataItem(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-sprintf: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataItem); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-sprintf: arg 2: " + "block item: " + "expected native of type binding.DataItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-sprintf: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("binding-sprintf: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-sprintf: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-sprintf: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.NewSprintf(arg0Val, arg1Val...) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.String)") + return res0Obj + }, + }, + // binding-string returns a bindable string value that is managed internally. + // + // Since: 2.0 + // + // Result: + // * Go(binding.String) + "binding-string": { + Doc: "binding.NewString", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewString() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.String)") + return res0Obj + }, + }, + // binding-string-list returns a bindable list of string values. + // + // Since: 2.0 + // + // Result: + // * Go(binding.StringList) + "binding-string-list": { + Doc: "binding.NewStringList", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewStringList() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.StringList)") + return res0Obj + }, + }, + // binding-string-tree returns a bindable tree of string values. + // + // Since: 2.4 + // + // Result: + // * Go(binding.StringTree) + "binding-string-tree": { + Doc: "binding.NewStringTree", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewStringTree() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.StringTree)") + return res0Obj + }, + }, + // binding-untyped returns a bindable any value that is managed internally. + // + // Since: 2.1 + // + // Result: + // * Go(binding.Untyped) + "binding-untyped": { + Doc: "binding.NewUntyped", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewUntyped() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Untyped)") + return res0Obj + }, + }, + // binding-untyped-list returns a bindable list of any values. + // + // Since: 2.1 + // + // Result: + // * Go(binding.UntypedList) + "binding-untyped-list": { + Doc: "binding.NewUntypedList", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewUntypedList() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.UntypedList)") + return res0Obj + }, + }, + // binding-untyped-map creates a new, empty map binding of string to any. + // + // Since: 2.0 + // + // Result: + // * Go(binding.UntypedMap) + "binding-untyped-map": { + Doc: "binding.NewUntypedMap", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewUntypedMap() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.UntypedMap)") + return res0Obj + }, + }, + // binding-untyped-tree returns a bindable tree of any values. + // + // Since: 2.5 + // + // Result: + // * Go(binding.UntypedTree) + "binding-untyped-tree": { + Doc: "binding.NewUntypedTree", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewUntypedTree() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.UntypedTree)") + return res0Obj + }, + }, + // binding-uri returns a bindable fyne.URI value that is managed internally. + // + // Since: 2.1 + // + // Result: + // * Go(binding.URI) + "binding-uri": { + Doc: "binding.NewURI", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewURI() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.URI)") + return res0Obj + }, + }, + // binding-uri-list returns a bindable list of fyne.URI values. + // + // Since: 2.1 + // + // Result: + // * Go(binding.URIList) + "binding-uri-list": { + Doc: "binding.NewURIList", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewURIList() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.URIList)") + return res0Obj + }, + }, + // binding-uri-tree returns a bindable tree of fyne.URI values. + // + // Since: 2.4 + // + // Result: + // * Go(binding.URITree) + "binding-uri-tree": { + Doc: "binding.NewURITree", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := binding.NewURITree() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.URITree)") + return res0Obj + }, + }, + // binding-not returns a Bool binding that invert the value of the given data binding. + // This is providing the logical binding-not boolean operation as a data binding. + // + // Since 2.4 + // + // Args: + // * data - Go(binding.Bool) + // Result: + // * Go(binding.Bool) + "binding-not": { + Doc: "binding.Not", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Bool + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Bool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-not: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Bool); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-not: arg 1: " + "expected native of type binding.Bool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-not: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-not: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.Not(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Bool)") + return res0Obj + }, + }, + // binding-or returns a Bool binding that return true when at least one of the passed Bool binding + // is true and false otherwise. It does apply a logical or boolean operation on all passed + // Bool bindings. This binding is two way. In case of a Set, it will propagate the value + // identically to all the Bool bindings used for its construction. + // + // Since 2.4 + // + // Args: + // * data - block[Go(binding.Bool)] + // Result: + // * Go(binding.Bool) + "binding-or": { + Doc: "binding.Or", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []binding.Bool + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]binding.Bool, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_binding_Bool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-or: arg 1: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Bool); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-or: arg 1: " + "block item: " + "expected native of type binding.Bool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-or: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("binding-or: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-or: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-or: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.Or(arg0Val...) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Bool)") + return res0Obj + }, + }, + // binding-string-to-bool creates a binding that connects a String data item to a Bool. + // Changes to the String will be parsed and pushed to the Bool if the parse was successful, and setting + // the Bool update the String binding. + // + // Since: 2.0 + // + // Args: + // * str - Go(binding.String) + // Result: + // * Go(binding.Bool) + "binding-string-to-bool": { + Doc: "binding.StringToBool", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.String + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-string-to-bool: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-string-to-bool: arg 1: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-string-to-bool: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-string-to-bool: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.StringToBool(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Bool)") + return res0Obj + }, + }, + // binding-string-to-bool-with-format creates a binding that connects a String data item to a Bool and is + // presented using the specified format. Changes to the Bool will be parsed and if the format matches and + // the parse is successful it will be pushed to the String. Setting the Bool will push a formatted value + // into the String. + // + // Since: 2.0 + // + // Args: + // * str - Go(binding.String) + // * format - string + // Result: + // * Go(binding.Bool) + "binding-string-to-bool-with-format": { + Doc: "binding.StringToBoolWithFormat", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.String + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-string-to-bool-with-format: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-string-to-bool-with-format: arg 1: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-string-to-bool-with-format: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-string-to-bool-with-format: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("binding-string-to-bool-with-format: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := binding.StringToBoolWithFormat(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Bool)") + return res0Obj + }, + }, + // binding-string-to-float creates a binding that connects a String data item to a Float. + // Changes to the String will be parsed and pushed to the Float if the parse was successful, and setting + // the Float update the String binding. + // + // Since: 2.0 + // + // Args: + // * str - Go(binding.String) + // Result: + // * Go(binding.Float) + "binding-string-to-float": { + Doc: "binding.StringToFloat", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.String + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-string-to-float: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-string-to-float: arg 1: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-string-to-float: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-string-to-float: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.StringToFloat(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Float)") + return res0Obj + }, + }, + // binding-string-to-float-with-format creates a binding that connects a String data item to a Float and is + // presented using the specified format. Changes to the Float will be parsed and if the format matches and + // the parse is successful it will be pushed to the String. Setting the Float will push a formatted value + // into the String. + // + // Since: 2.0 + // + // Args: + // * str - Go(binding.String) + // * format - string + // Result: + // * Go(binding.Float) + "binding-string-to-float-with-format": { + Doc: "binding.StringToFloatWithFormat", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.String + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-string-to-float-with-format: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-string-to-float-with-format: arg 1: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-string-to-float-with-format: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-string-to-float-with-format: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("binding-string-to-float-with-format: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := binding.StringToFloatWithFormat(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Float)") + return res0Obj + }, + }, + // binding-string-to-int creates a binding that connects a String data item to a Int. + // Changes to the String will be parsed and pushed to the Int if the parse was successful, and setting + // the Int update the String binding. + // + // Since: 2.0 + // + // Args: + // * str - Go(binding.String) + // Result: + // * Go(binding.Int) + "binding-string-to-int": { + Doc: "binding.StringToInt", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.String + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-string-to-int: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-string-to-int: arg 1: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-string-to-int: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-string-to-int: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.StringToInt(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Int)") + return res0Obj + }, + }, + // binding-string-to-int-with-format creates a binding that connects a String data item to a Int and is + // presented using the specified format. Changes to the Int will be parsed and if the format matches and + // the parse is successful it will be pushed to the String. Setting the Int will push a formatted value + // into the String. + // + // Since: 2.0 + // + // Args: + // * str - Go(binding.String) + // * format - string + // Result: + // * Go(binding.Int) + "binding-string-to-int-with-format": { + Doc: "binding.StringToIntWithFormat", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.String + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-string-to-int-with-format: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-string-to-int-with-format: arg 1: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-string-to-int-with-format: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-string-to-int-with-format: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("binding-string-to-int-with-format: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := binding.StringToIntWithFormat(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.Int)") + return res0Obj + }, + }, + // binding-string-to-string-with-format creates a binding that converts a string to another string using the specified format. + // Changes to the returned String will be pushed to the passed in String and setting a new string value will parse and + // set the underlying String if it matches the format and the parse was successful. + // + // Since: 2.2 + // + // Args: + // * str - Go(binding.String) + // * format - string + // Result: + // * Go(binding.String) + "binding-string-to-string-with-format": { + Doc: "binding.StringToStringWithFormat", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.String + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-string-to-string-with-format: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-string-to-string-with-format: arg 1: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-string-to-string-with-format: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-string-to-string-with-format: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("binding-string-to-string-with-format: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := binding.StringToStringWithFormat(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.String)") + return res0Obj + }, + }, + // binding-string-to-uri creates a binding that connects a String data item to a URI. + // Changes to the String will be parsed and pushed to the URI if the parse was successful, and setting + // the URI update the String binding. + // + // Since: 2.1 + // + // Args: + // * str - Go(binding.String) + // Result: + // * Go(binding.URI) + "binding-string-to-uri": { + Doc: "binding.StringToURI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.String + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-string-to-uri: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-string-to-uri: arg 1: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-string-to-uri: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-string-to-uri: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.StringToURI(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.URI)") + return res0Obj + }, + }, + // binding-uri-to-string creates a binding that connects a URI data item to a String. + // Changes to the URI will be pushed to the String and setting the string will parse and set the + // URI if the parse was successful. + // + // Since: 2.1 + // + // Args: + // * v - Go(binding.URI) + // Result: + // * Go(binding.String) + "binding-uri-to-string": { + Doc: "binding.URIToString", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("binding-uri-to-string: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("binding-uri-to-string: arg 1: " + "expected native of type binding.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("binding-uri-to-string: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("binding-uri-to-string: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := binding.URIToString(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(binding.String)") + return res0Obj + }, + }, + // Result: + // * integer + "canvas-image-fill-contain": { + Doc: "Get canvas.ImageFillContain value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(canvas.ImageFillContain))) + return resObj + }, + }, + // Result: + // * integer + "canvas-image-fill-original": { + Doc: "Get canvas.ImageFillOriginal value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(canvas.ImageFillOriginal))) + return resObj + }, + }, + // Result: + // * integer + "canvas-image-fill-stretch": { + Doc: "Get canvas.ImageFillStretch value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(canvas.ImageFillStretch))) + return resObj + }, + }, + // Result: + // * integer + "canvas-image-scale-fastest": { + Doc: "Get canvas.ImageScaleFastest value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int32(canvas.ImageScaleFastest))) + return resObj + }, + }, + // Result: + // * integer + "canvas-image-scale-pixels": { + Doc: "Get canvas.ImageScalePixels value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int32(canvas.ImageScalePixels))) + return resObj + }, + }, + // Result: + // * integer + "canvas-image-scale-smooth": { + Doc: "Get canvas.ImageScaleSmooth value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int32(canvas.ImageScaleSmooth))) + return resObj + }, + }, + // canvas-circle returns a new Circle instance + // + // Args: + // * color - Go(color.Color) + // Result: + // * Go(*canvas.Circle) + "canvas-circle": { + Doc: "canvas.NewCircle", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val color.Color + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-circle: arg 1: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-circle: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := canvas.NewCircle(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.Circle)") + return res0Obj + }, + }, + // canvas-color-rgba-animation sets up a new animation that will transition from the start to stop Color over + // the specified Duration. The colour transition will move linearly through the RGB colour space. + // The content of fn should apply the color values to an object and refresh it. + // You should call Start() on the returned animation to start it. + // + // Since: 2.0 + // + // Args: + // * start - Go(color.Color) + // * stop - Go(color.Color) + // * d - Go(time.Duration) + // * fn - fn { Go(color.Color) } + // Result: + // * Go(*fyne.Animation) + "canvas-color-rgba-animation": { + Doc: "canvas.NewColorRGBAAnimation", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val color.Color + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-color-rgba-animation: arg 1: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-color-rgba-animation: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-color-rgba-animation: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-color-rgba-animation: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val time.Duration + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(time.Duration); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-color-rgba-animation: arg 3: " + "expected native of type time.Duration, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-color-rgba-animation: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg3Val func(color.Color) + switch fn := arg3.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("canvas-color-rgba-animation: arg 4: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg3Val = func(farg0 color.Color) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(color.Color)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("canvas-color-rgba-animation: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("canvas-color-rgba-animation: arg 4: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := canvas.NewColorRGBAAnimation(arg0Val, arg1Val, arg2Val, arg3Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Animation)") + return res0Obj + }, + }, + // canvas-horizontal-gradient creates a new horizontally travelling linear gradient. + // The start color will be at the left of the gradient and the end color will be at the right. + // + // Args: + // * start - Go(color.Color) + // * end - Go(color.Color) + // Result: + // * Go(*canvas.LinearGradient) + "canvas-horizontal-gradient": { + Doc: "canvas.NewHorizontalGradient", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val color.Color + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-horizontal-gradient: arg 1: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-horizontal-gradient: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-horizontal-gradient: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-horizontal-gradient: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := canvas.NewHorizontalGradient(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.LinearGradient)") + return res0Obj + }, + }, + "canvas-image": { + Doc: "Create a new canvas.Image struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &canvas.Image{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*canvas.Image)") + return resObj + }, + }, + // canvas-image-from-file creates a new image from a local file. + // Images returned from this method will scale to fit the canvas object. + // The method for scaling can be set using the Fill field. + // + // Args: + // * file - string + // Result: + // * Go(*canvas.Image) + "canvas-image-from-file": { + Doc: "canvas.NewImageFromFile", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("canvas-image-from-file: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := canvas.NewImageFromFile(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.Image)") + return res0Obj + }, + }, + // canvas-image-from-image returns a new Image instance that is rendered from the Go + // image.Image passed in. + // Images returned from this method will scale to fit the canvas object. + // The method for scaling can be set using the Fill field. + // + // Args: + // * img - Go(image.Image) + // Result: + // * Go(*canvas.Image) + "canvas-image-from-image": { + Doc: "canvas.NewImageFromImage", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val image.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(image.Image); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-image-from-image: arg 1: " + "expected native of type image.Image, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-image-from-image: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := canvas.NewImageFromImage(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.Image)") + return res0Obj + }, + }, + // canvas-image-from-reader creates a new image from a data stream. + // The name parameter is required to uniquely identify this image (for caching etc.). + // If the image in this io.Reader is an SVG, the name should end ".svg". + // Images returned from this method will scale to fit the canvas object. + // The method for scaling can be set using the Fill field. + // + // Since: 2.0 + // + // Args: + // * read - Go(io.Reader) + // * name - string + // Result: + // * Go(*canvas.Image) + "canvas-image-from-reader": { + Doc: "canvas.NewImageFromReader", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val io.Reader + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_io_Reader(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("canvas-image-from-reader: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(io.Reader); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-image-from-reader: arg 1: " + "expected native of type io.Reader, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("canvas-image-from-reader: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("canvas-image-from-reader: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("canvas-image-from-reader: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := canvas.NewImageFromReader(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.Image)") + return res0Obj + }, + }, + // canvas-image-from-resource creates a new image by loading the specified resource. + // Images returned from this method will scale to fit the canvas object. + // The method for scaling can be set using the Fill field. + // + // Args: + // * res - Go(fyne.Resource) + // Result: + // * Go(*canvas.Image) + "canvas-image-from-resource": { + Doc: "canvas.NewImageFromResource", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Resource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("canvas-image-from-resource: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-image-from-resource: arg 1: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("canvas-image-from-resource: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("canvas-image-from-resource: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := canvas.NewImageFromResource(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.Image)") + return res0Obj + }, + }, + // canvas-image-from-uri creates a new image from named resource. + // File URIs will read the file path and other schemes will download the data into a resource. + // HTTP and HTTPs URIs will use the GET method by default to request the resource. + // Images returned from this method will scale to fit the canvas object. + // The method for scaling can be set using the Fill field. + // + // Since: 2.0 + // + // Args: + // * uri - Go(fyne.URI) + // Result: + // * Go(*canvas.Image) + "canvas-image-from-uri": { + Doc: "canvas.NewImageFromURI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("canvas-image-from-uri: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-image-from-uri: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("canvas-image-from-uri: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("canvas-image-from-uri: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := canvas.NewImageFromURI(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.Image)") + return res0Obj + }, + }, + // canvas-line returns a new Line instance + // + // Args: + // * color - Go(color.Color) + // Result: + // * Go(*canvas.Line) + "canvas-line": { + Doc: "canvas.NewLine", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val color.Color + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-line: arg 1: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-line: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := canvas.NewLine(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.Line)") + return res0Obj + }, + }, + // canvas-linear-gradient creates a linear gradient at the specified angle. + // The angle parameter is the degree angle along which the gradient is calculated. + // A NewHorizontalGradient uses 270 degrees and NewVerticalGradient is 0 degrees. + // + // Args: + // * start - Go(color.Color) + // * end - Go(color.Color) + // * angle - decimal + // Result: + // * Go(*canvas.LinearGradient) + "canvas-linear-gradient": { + Doc: "canvas.NewLinearGradient", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val color.Color + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-linear-gradient: arg 1: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-linear-gradient: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-linear-gradient: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-linear-gradient: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val float64 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("canvas-linear-gradient: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + res0 := canvas.NewLinearGradient(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.LinearGradient)") + return res0Obj + }, + }, + // canvas-position-animation sets up a new animation that will transition from the start to stop Position over + // the specified Duration. The content of fn should apply the position value to an object for the change + // to be visible. You should call Start() on the returned animation to start it. + // + // Since: 2.0 + // + // Args: + // * start - Go(fyne.Position) + // * stop - Go(fyne.Position) + // * d - Go(time.Duration) + // * fn - fn { Go(fyne.Position) } + // Result: + // * Go(*fyne.Animation) + "canvas-position-animation": { + Doc: "canvas.NewPositionAnimation", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Position + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-position-animation: arg 1: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-position-animation: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-position-animation: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-position-animation: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val time.Duration + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(time.Duration); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-position-animation: arg 3: " + "expected native of type time.Duration, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-position-animation: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg3Val func(fyne.Position) + switch fn := arg3.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("canvas-position-animation: arg 4: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg3Val = func(farg0 fyne.Position) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*fyne.Position)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("canvas-position-animation: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("canvas-position-animation: arg 4: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := canvas.NewPositionAnimation(arg0Val, arg1Val, arg2Val, arg3Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Animation)") + return res0Obj + }, + }, + // canvas-radial-gradient creates a new radial gradient. + // + // Args: + // * start - Go(color.Color) + // * end - Go(color.Color) + // Result: + // * Go(*canvas.RadialGradient) + "canvas-radial-gradient": { + Doc: "canvas.NewRadialGradient", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val color.Color + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-radial-gradient: arg 1: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-radial-gradient: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-radial-gradient: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-radial-gradient: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := canvas.NewRadialGradient(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.RadialGradient)") + return res0Obj + }, + }, + // canvas-raster returns a new Image instance that is rendered dynamically using + // the specified generate function. + // Images returned from this method should draw dynamically to fill the width + // and height parameters passed to pixelColor. + // + // Args: + // * generate - fn { integer integer } -> Go(image.Image) + // Result: + // * Go(*canvas.Raster) + "canvas-raster": { + Doc: "canvas.NewRaster", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val func(int, int) image.Image + switch fn := arg0.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("canvas-raster: arg 1: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg0Val = func(farg0 int, farg1 int) image.Image { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = *env.NewInteger(int64(farg1)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + var res image.Image + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(image.Image); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "canvas-raster: arg 1: callback result: "+"expected native of type image.Image, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "canvas-raster: arg 1: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("canvas-raster: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("canvas-raster: arg 1: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := canvas.NewRaster(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.Raster)") + return res0Obj + }, + }, + // canvas-raster-from-image returns a new Raster instance that is rendered from the Go + // image.Image passed in. + // Rasters returned from this method will map pixel for pixel to the screen + // starting img.Bounds().Min pixels from the top left of the canvas object. + // Truncates rather than scales the image. + // If smaller than the target space, the image will be padded with zero-pixels to the target size. + // + // Args: + // * img - Go(image.Image) + // Result: + // * Go(*canvas.Raster) + "canvas-raster-from-image": { + Doc: "canvas.NewRasterFromImage", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val image.Image + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(image.Image); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-raster-from-image: arg 1: " + "expected native of type image.Image, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-raster-from-image: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := canvas.NewRasterFromImage(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.Raster)") + return res0Obj + }, + }, + // canvas-raster-with-pixels returns a new Image instance that is rendered dynamically + // by iterating over the specified pixelColor function for each x, y pixel. + // Images returned from this method should draw dynamically to fill the width + // and height parameters passed to pixelColor. + // + // Args: + // * pixel-color - fn { integer integer integer integer } -> Go(color.Color) + // Result: + // * Go(*canvas.Raster) + "canvas-raster-with-pixels": { + Doc: "canvas.NewRasterWithPixels", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val func(int, int, int, int) color.Color + switch fn := arg0.(type) { + case env.Function: + if fn.Argsn != 4 { + ps.FailureFlag = true + return env.NewError("canvas-raster-with-pixels: arg 1: " + "expected 4 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg0Val = func(farg0 int, farg1 int, farg2 int, farg3 int) color.Color { + var farg0Val, farg1Val, farg2Val, farg3Val env.Object + farg0Val = *env.NewInteger(int64(farg0)) + farg1Val = *env.NewInteger(int64(farg1)) + farg2Val = *env.NewInteger(int64(farg2)) + farg3Val = *env.NewInteger(int64(farg3)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val, farg3Val) + var res color.Color + switch v := ps.Res.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "canvas-raster-with-pixels: arg 1: callback result: "+"expected native of type color.Color, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "canvas-raster-with-pixels: arg 1: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("canvas-raster-with-pixels: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("canvas-raster-with-pixels: arg 1: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := canvas.NewRasterWithPixels(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.Raster)") + return res0Obj + }, + }, + // canvas-rectangle returns a new Rectangle instance + // + // Args: + // * color - Go(color.Color) + // Result: + // * Go(*canvas.Rectangle) + "canvas-rectangle": { + Doc: "canvas.NewRectangle", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val color.Color + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-rectangle: arg 1: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-rectangle: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := canvas.NewRectangle(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.Rectangle)") + return res0Obj + }, + }, + // canvas-size-animation sets up a new animation that will transition from the start to stop Size over + // the specified Duration. The content of fn should apply the size value to an object for the change + // to be visible. You should call Start() on the returned animation to start it. + // + // Since: 2.0 + // + // Args: + // * start - Go(fyne.Size) + // * stop - Go(fyne.Size) + // * d - Go(time.Duration) + // * fn - fn { Go(fyne.Size) } + // Result: + // * Go(*fyne.Animation) + "canvas-size-animation": { + Doc: "canvas.NewSizeAnimation", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Size + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-size-animation: arg 1: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-size-animation: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Size + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-size-animation: arg 2: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-size-animation: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val time.Duration + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(time.Duration); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-size-animation: arg 3: " + "expected native of type time.Duration, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-size-animation: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg3Val func(fyne.Size) + switch fn := arg3.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("canvas-size-animation: arg 4: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg3Val = func(farg0 fyne.Size) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*fyne.Size)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("canvas-size-animation: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("canvas-size-animation: arg 4: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := canvas.NewSizeAnimation(arg0Val, arg1Val, arg2Val, arg3Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Animation)") + return res0Obj + }, + }, + // canvas-text returns a new Text implementation + // + // Args: + // * text - string + // * color - Go(color.Color) + // Result: + // * Go(*canvas.Text) + "canvas-text": { + Doc: "canvas.NewText", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("canvas-text: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-text: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-text: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := canvas.NewText(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.Text)") + return res0Obj + }, + }, + // canvas-vertical-gradient creates a new vertically travelling linear gradient. + // The start color will be at the top of the gradient and the end color will be at the bottom. + // + // Args: + // * start - Go(color.Color) + // * end - Go(color.Color) + // Result: + // * Go(*canvas.LinearGradient) + "canvas-vertical-gradient": { + Doc: "canvas.NewVerticalGradient", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val color.Color + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-vertical-gradient: arg 1: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-vertical-gradient: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val color.Color + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(color.Color); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-vertical-gradient: arg 2: " + "expected native of type color.Color, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("canvas-vertical-gradient: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := canvas.NewVerticalGradient(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*canvas.LinearGradient)") + return res0Obj + }, + }, + // canvas-refresh instructs the containing canvas to refresh the specified obj. + // + // Args: + // * obj - Go(fyne.CanvasObject) + "canvas-refresh": { + Doc: "canvas.Refresh", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("canvas-refresh: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("canvas-refresh: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("canvas-refresh: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("canvas-refresh: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + canvas.Refresh(arg0Val) + return nil + }, + }, + // container-container returns a new Container instance holding the specified CanvasObjects which will be laid out according to the specified Layout. + // + // Since: 2.0 + // + // Args: + // * layout - Go(fyne.Layout) + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "container-container": { + Doc: "container.New", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Layout + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Layout(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("container-container: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Layout); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("container-container: arg 1: " + "expected native of type fyne.Layout, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("container-container: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("container-container: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []fyne.CanvasObject + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("container-container: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("container-container: arg 2: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("container-container: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("container-container: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("container-container: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("container-container: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.New(arg0Val, arg1Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // adaptive-grid creates a new container with the specified objects and using the grid layout. + // When in a horizontal arrangement the rowcols parameter will specify the column count, when in vertical + // it will specify the rows. On mobile this will dynamically refresh when device is rotated. + // + // Since: 1.4 + // + // Args: + // * rowcols - integer + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "adaptive-grid": { + Doc: "container.NewAdaptiveGrid", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val int + if vc, ok := arg0.(env.Integer); ok { + arg0Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("adaptive-grid: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val []fyne.CanvasObject + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("adaptive-grid: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("adaptive-grid: arg 2: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("adaptive-grid: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("adaptive-grid: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("adaptive-grid: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("adaptive-grid: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewAdaptiveGrid(arg0Val, arg1Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // app-tabs creates a new tab container that allows the user to choose between different areas of an app. + // + // Since: 1.4 + // + // Args: + // * items - block[Go(*container.TabItem)] + // Result: + // * Go(*container.AppTabs) + "app-tabs": { + Doc: "container.NewAppTabs", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []*container.TabItem + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]*container.TabItem, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("app-tabs: arg 1: " + "block item: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("app-tabs: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("app-tabs: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("app-tabs: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("app-tabs: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewAppTabs(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.AppTabs)") + return res0Obj + }, + }, + // border creates a new container with the specified objects and using the border layout. + // The top, bottom, left and right parameters specify the items that should be placed around edges. + // Nil can be used to an edge if it should not be filled. + // Passed objects not assigned to any edge (parameters 5 onwards) will be used to fill the space + // remaining in the middle. + // Parameters 6 onwards will be stacked over the middle content in the specified order as a Stack container. + // + // Since: 1.4 + // + // Args: + // * top - Go(fyne.CanvasObject) + // * bottom - Go(fyne.CanvasObject) + // * left - Go(fyne.CanvasObject) + // * right - Go(fyne.CanvasObject) + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "border": { + Doc: "container.NewBorder", + Argsn: 5, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("border: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("border: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("border: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("border: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("border: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("border: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("border: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("border: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.CanvasObject + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("border: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("border: arg 3: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("border: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("border: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg3Val fyne.CanvasObject + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("border: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("border: arg 4: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("border: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("border: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg4Val []fyne.CanvasObject + switch v := arg4.(type) { + case env.Block: + arg4Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg4Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("border: arg 5: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("border: arg 5: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("border: arg 5: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("border: arg 5: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("border: arg 5: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg4Val = nil + default: + ps.FailureFlag = true + return env.NewError("border: arg 5: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewBorder(arg0Val, arg1Val, arg2Val, arg3Val, arg4Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // center creates a new container with the specified objects centered in the available space. + // + // Since: 1.4 + // + // Args: + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "center": { + Doc: "container.NewCenter", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []fyne.CanvasObject + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("center: arg 1: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("center: arg 1: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("center: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("center: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("center: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("center: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewCenter(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // doc-tabs creates a new tab container that allows the user to choose between various pieces of content. + // + // Since: 2.1 + // + // Args: + // * items - block[Go(*container.TabItem)] + // Result: + // * Go(*container.DocTabs) + "doc-tabs": { + Doc: "container.NewDocTabs", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []*container.TabItem + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]*container.TabItem, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*container.TabItem); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("doc-tabs: arg 1: " + "block item: " + "expected native of type *container.TabItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("doc-tabs: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("doc-tabs: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("doc-tabs: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("doc-tabs: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewDocTabs(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.DocTabs)") + return res0Obj + }, + }, + // grid-with-columns creates a new container with the specified objects and using the grid layout with + // a specified number of columns. The number of rows will depend on how many children are in the container. + // + // Since: 1.4 + // + // Args: + // * cols - integer + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "grid-with-columns": { + Doc: "container.NewGridWithColumns", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val int + if vc, ok := arg0.(env.Integer); ok { + arg0Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("grid-with-columns: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val []fyne.CanvasObject + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("grid-with-columns: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("grid-with-columns: arg 2: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("grid-with-columns: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("grid-with-columns: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("grid-with-columns: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("grid-with-columns: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewGridWithColumns(arg0Val, arg1Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // grid-with-rows creates a new container with the specified objects and using the grid layout with + // a specified number of rows. The number of columns will depend on how many children are in the container. + // + // Since: 1.4 + // + // Args: + // * rows - integer + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "grid-with-rows": { + Doc: "container.NewGridWithRows", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val int + if vc, ok := arg0.(env.Integer); ok { + arg0Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("grid-with-rows: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val []fyne.CanvasObject + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("grid-with-rows: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("grid-with-rows: arg 2: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("grid-with-rows: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("grid-with-rows: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("grid-with-rows: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("grid-with-rows: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewGridWithRows(arg0Val, arg1Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // grid-wrap creates a new container with the specified objects and using the gridwrap layout. + // Every element will be resized to the size parameter and the content will arrange along a row and flow to a + // new row if the elements don't fit. + // + // Since: 1.4 + // + // Args: + // * size - Go(fyne.Size) + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "grid-wrap": { + Doc: "container.NewGridWrap", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Size + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("grid-wrap: arg 1: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("grid-wrap: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []fyne.CanvasObject + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("grid-wrap: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("grid-wrap: arg 2: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("grid-wrap: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("grid-wrap: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("grid-wrap: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("grid-wrap: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewGridWrap(arg0Val, arg1Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // h-box creates a new container with the specified objects and using the HBox layout. + // The objects will be placed in the container from left to right and always displayed + // at their horizontal MinSize. Use a different layout if the objects are intended + // to be larger then their horizontal MinSize. + // + // Since: 1.4 + // + // Args: + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "h-box": { + Doc: "container.NewHBox", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []fyne.CanvasObject + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("h-box: arg 1: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("h-box: arg 1: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("h-box: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("h-box: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("h-box: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("h-box: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewHBox(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // h-scroll create a scrollable parent wrapping the specified content. + // Note that this may cause the MinSize.Width to be smaller than that of the passed object. + // + // Since: 1.4 + // + // Args: + // * content - Go(fyne.CanvasObject) + // Result: + // * Go(*container.Scroll) + "h-scroll": { + Doc: "container.NewHScroll", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("h-scroll: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("h-scroll: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("h-scroll: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("h-scroll: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewHScroll(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.Scroll)") + return res0Obj + }, + }, + // h-split creates a horizontally arranged container with the specified leading and trailing elements. + // A vertical split bar that can be dragged will be added between the elements. + // + // Since: 1.4 + // + // Args: + // * leading - Go(fyne.CanvasObject) + // * trailing - Go(fyne.CanvasObject) + // Result: + // * Go(*container.Split) + "h-split": { + Doc: "container.NewHSplit", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("h-split: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("h-split: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("h-split: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("h-split: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("h-split: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("h-split: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("h-split: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("h-split: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewHSplit(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.Split)") + return res0Obj + }, + }, + // inner-window creates a new window border around the given `content`, displaying the `title` along the top. + // This will behave like a normal contain and will probably want to be added to a `MultipleWindows` parent. + // + // Since: 2.5 + // + // Args: + // * title - string + // * content - Go(fyne.CanvasObject) + // Result: + // * Go(*container.InnerWindow) + "inner-window": { + Doc: "container.NewInnerWindow", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("inner-window: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("inner-window: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("inner-window: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("inner-window: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("inner-window: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewInnerWindow(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.InnerWindow)") + return res0Obj + }, + }, + // container-max creates a new container with the specified objects filling the available space. + // + // Since: 1.4 + // + // Deprecated: Use container.NewStack() instead. + // + // Args: + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "container-max": { + Doc: "container.NewMax", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []fyne.CanvasObject + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("container-max: arg 1: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("container-max: arg 1: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("container-max: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("container-max: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("container-max: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("container-max: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewMax(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // multiple-windows creates a new `MultipleWindows` container to manage many inner windows. + // The initial window list is passed optionally to this constructor function. + // You can add new more windows to this container by calling `Add` or updating the `Windows` + // field and calling `Refresh`. + // + // Since: 2.5 + // + // Args: + // * wins - block[Go(*container.InnerWindow)] + // Result: + // * Go(*container.MultipleWindows) + "multiple-windows": { + Doc: "container.NewMultipleWindows", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []*container.InnerWindow + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]*container.InnerWindow, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*container.InnerWindow); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("multiple-windows: arg 1: " + "block item: " + "expected native of type *container.InnerWindow, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("multiple-windows: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("multiple-windows: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("multiple-windows: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("multiple-windows: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewMultipleWindows(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.MultipleWindows)") + return res0Obj + }, + }, + // padded creates a new container with the specified objects inset by standard padding size. + // + // Since: 1.4 + // + // Args: + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "padded": { + Doc: "container.NewPadded", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []fyne.CanvasObject + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("padded: arg 1: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("padded: arg 1: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("padded: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("padded: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("padded: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("padded: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewPadded(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // scroll creates a scrollable parent wrapping the specified content. + // Note that this may cause the MinSize to be smaller than that of the passed object. + // + // Since: 1.4 + // + // Args: + // * content - Go(fyne.CanvasObject) + // Result: + // * Go(*container.Scroll) + "scroll": { + Doc: "container.NewScroll", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("scroll: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("scroll: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("scroll: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("scroll: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewScroll(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.Scroll)") + return res0Obj + }, + }, + "split": { + Doc: "Create a new container.Split struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &container.Split{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*container.Split)") + return resObj + }, + }, + // stack returns a new container that stacks objects on top of each other. + // Objects at the end of the container will be stacked on top of objects before. + // Having only a single object has no impact as CanvasObjects will + // fill the available space even without a Stack. + // + // Since: 2.4 + // + // Args: + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "stack": { + Doc: "container.NewStack", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []fyne.CanvasObject + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("stack: arg 1: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("stack: arg 1: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("stack: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("stack: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("stack: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("stack: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewStack(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // tab-item creates a new item for a tabbed widget - each item specifies the content and a label for its tab. + // + // Since: 1.4 + // + // Args: + // * text - string + // * content - Go(fyne.CanvasObject) + // Result: + // * Go(*container.TabItem) + "tab-item": { + Doc: "container.NewTabItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("tab-item: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("tab-item: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("tab-item: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("tab-item: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("tab-item: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewTabItem(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.TabItem)") + return res0Obj + }, + }, + // tab-item-with-icon creates a new item for a tabbed widget - each item specifies the content and a label with an icon for its tab. + // + // Since: 1.4 + // + // Args: + // * text - string + // * icon - Go(fyne.Resource) + // * content - Go(fyne.CanvasObject) + // Result: + // * Go(*container.TabItem) + "tab-item-with-icon": { + Doc: "container.NewTabItemWithIcon", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("tab-item-with-icon: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("tab-item-with-icon: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("tab-item-with-icon: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("tab-item-with-icon: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("tab-item-with-icon: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.CanvasObject + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("tab-item-with-icon: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("tab-item-with-icon: arg 3: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("tab-item-with-icon: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("tab-item-with-icon: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewTabItemWithIcon(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.TabItem)") + return res0Obj + }, + }, + // theme-override provides a container where the child widgets are themed by the specified theme. + // Containers will be traversed and all child widgets will reflect the theme in this container. + // This should be used sparingly to avoid a jarring user experience. + // + // If the content `obj` of this theme override is a container and items are later added to the container or any + // sub-containers ensure that you call `Refresh()` on this `ThemeOverride` to ensure the new items match the theme. + // + // Since: 2.5 + // + // Args: + // * obj - Go(fyne.CanvasObject) + // * th - Go(fyne.Theme) + // Result: + // * Go(*container.ThemeOverride) + "theme-override": { + Doc: "container.NewThemeOverride", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("theme-override: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("theme-override: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("theme-override: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("theme-override: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Theme + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Theme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("theme-override: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Theme); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("theme-override: arg 2: " + "expected native of type fyne.Theme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("theme-override: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("theme-override: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewThemeOverride(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.ThemeOverride)") + return res0Obj + }, + }, + // v-box creates a new container with the specified objects and using the VBox layout. + // The objects will be stacked in the container from top to bottom and always displayed + // at their vertical MinSize. Use a different layout if the objects are intended + // to be larger then their vertical MinSize. + // + // Since: 1.4 + // + // Args: + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "v-box": { + Doc: "container.NewVBox", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []fyne.CanvasObject + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("v-box: arg 1: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("v-box: arg 1: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("v-box: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("v-box: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("v-box: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("v-box: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewVBox(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // v-scroll a scrollable parent wrapping the specified content. + // Note that this may cause the MinSize.Height to be smaller than that of the passed object. + // + // Since: 1.4 + // + // Args: + // * content - Go(fyne.CanvasObject) + // Result: + // * Go(*container.Scroll) + "v-scroll": { + Doc: "container.NewVScroll", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("v-scroll: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("v-scroll: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("v-scroll: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("v-scroll: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewVScroll(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.Scroll)") + return res0Obj + }, + }, + // v-split creates a vertically arranged container with the specified top and bottom elements. + // A horizontal split bar that can be dragged will be added between the elements. + // + // Since: 1.4 + // + // Args: + // * top - Go(fyne.CanvasObject) + // * bottom - Go(fyne.CanvasObject) + // Result: + // * Go(*container.Split) + "v-split": { + Doc: "container.NewVSplit", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("v-split: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("v-split: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("v-split: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("v-split: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("v-split: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("v-split: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("v-split: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("v-split: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewVSplit(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*container.Split)") + return res0Obj + }, + }, + // without-layout returns a new Container instance holding the specified CanvasObjects that are manually arranged. + // + // Since: 2.0 + // + // Args: + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "without-layout": { + Doc: "container.NewWithoutLayout", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []fyne.CanvasObject + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("without-layout: arg 1: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("without-layout: arg 1: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("without-layout: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("without-layout: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("without-layout: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("without-layout: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := container.NewWithoutLayout(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // Result: + // * Go(container.ScrollDirection) + "scroll-both": { + Doc: "Get container.ScrollBoth value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewNative(ps.Idx, container.ScrollBoth, "Go(container.ScrollDirection)") + return resObj + }, + }, + // Result: + // * Go(container.ScrollDirection) + "scroll-horizontal-only": { + Doc: "Get container.ScrollHorizontalOnly value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewNative(ps.Idx, container.ScrollHorizontalOnly, "Go(container.ScrollDirection)") + return resObj + }, + }, + // Result: + // * Go(container.ScrollDirection) + "scroll-none": { + Doc: "Get container.ScrollNone value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewNative(ps.Idx, container.ScrollNone, "Go(container.ScrollDirection)") + return resObj + }, + }, + // Result: + // * Go(container.ScrollDirection) + "scroll-vertical-only": { + Doc: "Get container.ScrollVerticalOnly value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewNative(ps.Idx, container.ScrollVerticalOnly, "Go(container.ScrollDirection)") + return resObj + }, + }, + // Result: + // * integer + "tab-location-bottom": { + Doc: "Get container.TabLocationBottom value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(container.TabLocationBottom))) + return resObj + }, + }, + // Result: + // * integer + "tab-location-leading": { + Doc: "Get container.TabLocationLeading value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(container.TabLocationLeading))) + return resObj + }, + }, + // Result: + // * integer + "tab-location-top": { + Doc: "Get container.TabLocationTop value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(container.TabLocationTop))) + return resObj + }, + }, + // Result: + // * integer + "tab-location-trailing": { + Doc: "Get container.TabLocationTrailing value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(container.TabLocationTrailing))) + return resObj + }, + }, + // Result: + // * Go(desktop.StandardCursor) + "desktop-crosshair-cursor": { + Doc: "Get desktop.CrosshairCursor value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewNative(ps.Idx, desktop.CrosshairCursor, "Go(desktop.StandardCursor)") + return resObj + }, + }, + // Result: + // * Go(desktop.StandardCursor) + "desktop-default-cursor": { + Doc: "Get desktop.DefaultCursor value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewNative(ps.Idx, desktop.DefaultCursor, "Go(desktop.StandardCursor)") + return resObj + }, + }, + // Result: + // * Go(desktop.StandardCursor) + "desktop-h-resize-cursor": { + Doc: "Get desktop.HResizeCursor value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewNative(ps.Idx, desktop.HResizeCursor, "Go(desktop.StandardCursor)") + return resObj + }, + }, + // Result: + // * Go(desktop.StandardCursor) + "desktop-hidden-cursor": { + Doc: "Get desktop.HiddenCursor value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewNative(ps.Idx, desktop.HiddenCursor, "Go(desktop.StandardCursor)") + return resObj + }, + }, + // Result: + // * string + "desktop-key-alt-left": { + Doc: "Get desktop.KeyAltLeft value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(desktop.KeyAltLeft)) + return resObj + }, + }, + // Result: + // * string + "desktop-key-alt-right": { + Doc: "Get desktop.KeyAltRight value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(desktop.KeyAltRight)) + return resObj + }, + }, + // Result: + // * string + "desktop-key-caps-lock": { + Doc: "Get desktop.KeyCapsLock value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(desktop.KeyCapsLock)) + return resObj + }, + }, + // Result: + // * string + "desktop-key-control-left": { + Doc: "Get desktop.KeyControlLeft value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(desktop.KeyControlLeft)) + return resObj + }, + }, + // Result: + // * string + "desktop-key-control-right": { + Doc: "Get desktop.KeyControlRight value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(desktop.KeyControlRight)) + return resObj + }, + }, + // Result: + // * string + "desktop-key-menu": { + Doc: "Get desktop.KeyMenu value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(desktop.KeyMenu)) + return resObj + }, + }, + // Result: + // * string + "desktop-key-none": { + Doc: "Get desktop.KeyNone value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(desktop.KeyNone)) + return resObj + }, + }, + // Result: + // * string + "desktop-key-print-screen": { + Doc: "Get desktop.KeyPrintScreen value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(desktop.KeyPrintScreen)) + return resObj + }, + }, + // Result: + // * string + "desktop-key-shift-left": { + Doc: "Get desktop.KeyShiftLeft value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(desktop.KeyShiftLeft)) + return resObj + }, + }, + // Result: + // * string + "desktop-key-shift-right": { + Doc: "Get desktop.KeyShiftRight value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(desktop.KeyShiftRight)) + return resObj + }, + }, + // Result: + // * string + "desktop-key-super-left": { + Doc: "Get desktop.KeySuperLeft value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(desktop.KeySuperLeft)) + return resObj + }, + }, + // Result: + // * string + "desktop-key-super-right": { + Doc: "Get desktop.KeySuperRight value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(desktop.KeySuperRight)) + return resObj + }, + }, + // Result: + // * integer + "desktop-left-mouse-button": { + Doc: "Get desktop.LeftMouseButton value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(desktop.LeftMouseButton))) + return resObj + }, + }, + // Result: + // * integer + "desktop-mouse-button-primary": { + Doc: "Get desktop.MouseButtonPrimary value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(desktop.MouseButtonPrimary))) + return resObj + }, + }, + // Result: + // * integer + "desktop-mouse-button-secondary": { + Doc: "Get desktop.MouseButtonSecondary value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(desktop.MouseButtonSecondary))) + return resObj + }, + }, + // Result: + // * integer + "desktop-mouse-button-tertiary": { + Doc: "Get desktop.MouseButtonTertiary value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(desktop.MouseButtonTertiary))) + return resObj + }, + }, + "desktop-custom-shortcut": { + Doc: "Create a new desktop.CustomShortcut struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &desktop.CustomShortcut{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*desktop.CustomShortcut)") + return resObj + }, + }, + "desktop-mouse-event": { + Doc: "Create a new desktop.MouseEvent struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &desktop.MouseEvent{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*desktop.MouseEvent)") + return resObj + }, + }, + // Result: + // * Go(desktop.StandardCursor) + "desktop-pointer-cursor": { + Doc: "Get desktop.PointerCursor value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewNative(ps.Idx, desktop.PointerCursor, "Go(desktop.StandardCursor)") + return resObj + }, + }, + // Result: + // * integer + "desktop-right-mouse-button": { + Doc: "Get desktop.RightMouseButton value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(desktop.RightMouseButton))) + return resObj + }, + }, + // Result: + // * Go(desktop.StandardCursor) + "desktop-text-cursor": { + Doc: "Get desktop.TextCursor value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewNative(ps.Idx, desktop.TextCursor, "Go(desktop.StandardCursor)") + return resObj + }, + }, + // Result: + // * Go(desktop.StandardCursor) + "desktop-v-resize-cursor": { + Doc: "Get desktop.VResizeCursor value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewNative(ps.Idx, desktop.VResizeCursor, "Go(desktop.StandardCursor)") + return resObj + }, + }, + // dialog-color-picker creates a color dialog and returns the handle. + // Using the returned type you should call Show() and then set its color through SetColor(). + // The callback is triggered when the user selects a color. + // + // Since: 1.4 + // + // Args: + // * title - string + // * message - string + // * callback - fn { Go(color.Color) } + // * parent - Go(fyne.Window) + // Result: + // * Go(*dialog.ColorPickerDialog) + "dialog-color-picker": { + Doc: "dialog.NewColorPicker", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-color-picker: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-color-picker: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val func(color.Color) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("dialog-color-picker: arg 3: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 color.Color) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(color.Color)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-color-picker: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-color-picker: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg3Val fyne.Window + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-color-picker: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-color-picker: arg 4: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-color-picker: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-color-picker: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := dialog.NewColorPicker(arg0Val, arg1Val, arg2Val, arg3Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*dialog.ColorPickerDialog)") + return res0Obj + }, + }, + "dialog-color-picker-dialog": { + Doc: "Create a new dialog.ColorPickerDialog struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &dialog.ColorPickerDialog{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*dialog.ColorPickerDialog)") + return resObj + }, + }, + // dialog-confirm creates a dialog over the specified window for user confirmation. + // The title is used for the dialog window and message is the content. + // The callback is executed when the user decides. After creation you should call Show(). + // + // Args: + // * title - string + // * message - string + // * callback - fn { bool } + // * parent - Go(fyne.Window) + // Result: + // * Go(*dialog.ConfirmDialog) + "dialog-confirm": { + Doc: "dialog.NewConfirm", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-confirm: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-confirm: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val func(bool) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("dialog-confirm: arg 3: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 bool) { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-confirm: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-confirm: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg3Val fyne.Window + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-confirm: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-confirm: arg 4: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-confirm: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-confirm: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := dialog.NewConfirm(arg0Val, arg1Val, arg2Val, arg3Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*dialog.ConfirmDialog)") + return res0Obj + }, + }, + "dialog-confirm-dialog": { + Doc: "Create a new dialog.ConfirmDialog struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &dialog.ConfirmDialog{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*dialog.ConfirmDialog)") + return resObj + }, + }, + // dialog-custom creates and returns a dialog over the specified application using custom + // content. The button will have the dismiss text set. + // The MinSize() of the CanvasObject passed will be used to set the size of the window. + // + // Args: + // * title - string + // * dismiss - string + // * content - Go(fyne.CanvasObject) + // * parent - Go(fyne.Window) + // Result: + // * Go(*dialog.CustomDialog) + "dialog-custom": { + Doc: "dialog.NewCustom", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-custom: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-custom: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.CanvasObject + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-custom: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-custom: arg 3: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-custom: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-custom: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg3Val fyne.Window + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-custom: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-custom: arg 4: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-custom: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-custom: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := dialog.NewCustom(arg0Val, arg1Val, arg2Val, arg3Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*dialog.CustomDialog)") + return res0Obj + }, + }, + "dialog-custom-dialog": { + Doc: "Create a new dialog.CustomDialog struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &dialog.CustomDialog{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*dialog.CustomDialog)") + return resObj + }, + }, + // dialog-custom-without-buttons creates a new custom dialog without any buttons. + // The MinSize() of the CanvasObject passed will be used to set the size of the window. + // + // Since: 2.4 + // + // Args: + // * title - string + // * content - Go(fyne.CanvasObject) + // * parent - Go(fyne.Window) + // Result: + // * Go(*dialog.CustomDialog) + "dialog-custom-without-buttons": { + Doc: "dialog.NewCustomWithoutButtons", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-custom-without-buttons: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-custom-without-buttons: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-custom-without-buttons: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-custom-without-buttons: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-custom-without-buttons: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Window + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-custom-without-buttons: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-custom-without-buttons: arg 3: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-custom-without-buttons: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-custom-without-buttons: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := dialog.NewCustomWithoutButtons(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*dialog.CustomDialog)") + return res0Obj + }, + }, + // dialog-entry-dialog creates a dialog over the specified window for the user to enter a value. + // + // onConfirm is a callback that runs when the user enters a string of + // text and clicks the "confirm" button. May be nil. + // + // Deprecated: Use dialog.NewForm() with a widget.Entry inside instead. + // + // Args: + // * title - string + // * message - string + // * on-confirm - fn { string } + // * parent - Go(fyne.Window) + // Result: + // * Go(*dialog.EntryDialog) + "dialog-entry-dialog": { + Doc: "dialog.NewEntryDialog", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-entry-dialog: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-entry-dialog: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val func(string) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("dialog-entry-dialog: arg 3: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-entry-dialog: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-entry-dialog: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg3Val fyne.Window + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-entry-dialog: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-entry-dialog: arg 4: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-entry-dialog: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-entry-dialog: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := dialog.NewEntryDialog(arg0Val, arg1Val, arg2Val, arg3Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*dialog.EntryDialog)") + return res0Obj + }, + }, + // dialog-error creates a dialog over the specified window for an application error. + // The message is extracted from the provided error (should not be nil). + // After creation you should call Show(). + // + // Args: + // * err - Go(error) + // * parent - Go(fyne.Window) + // Result: + // * Go(dialog.Dialog) + "dialog-error": { + Doc: "dialog.NewError", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val error + switch v := arg0.(type) { + case env.String: + arg0Val = errors.New(v.Value) + case env.Error: + arg0Val = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-error: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-error: arg 1: " + "expected error, string or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Window + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-error: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-error: arg 2: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-error: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-error: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := dialog.NewError(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(dialog.Dialog)") + return res0Obj + }, + }, + "dialog-file-dialog": { + Doc: "Create a new dialog.FileDialog struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &dialog.FileDialog{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*dialog.FileDialog)") + return resObj + }, + }, + // dialog-file-open creates a file dialog allowing the user to choose a file to open. + // + // The callback function will run when the dialog closes and provide a reader for the chosen file. + // The reader will be nil when the user cancels or when nothing is selected. + // When the reader isn't nil it must be closed by the callback. + // + // The dialog will appear over the window specified when Show() is called. + // + // Args: + // * callback - fn { Go(fyne.URIReadCloser) Go(error) } + // * parent - Go(fyne.Window) + // Result: + // * Go(*dialog.FileDialog) + "dialog-file-open": { + Doc: "dialog.NewFileOpen", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val func(fyne.URIReadCloser, error) + switch fn := arg0.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("dialog-file-open: arg 1: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg0Val = func(farg0 fyne.URIReadCloser, farg1 error) { + var farg0Val, farg1Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URIReadCloser)") + if farg1 != nil { + farg1Val = env.NewError(farg1.Error()) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-file-open: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-file-open: arg 1: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg1Val fyne.Window + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-file-open: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-file-open: arg 2: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-file-open: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-file-open: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := dialog.NewFileOpen(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*dialog.FileDialog)") + return res0Obj + }, + }, + // dialog-file-save creates a file dialog allowing the user to choose a file to save + // to (new or overwrite). If the user chooses an existing file they will be + // asked if they are sure. + // + // The callback function will run when the dialog closes and provide a writer for the chosen file. + // The writer will be nil when the user cancels or when nothing is selected. + // When the writer isn't nil it must be closed by the callback. + // + // The dialog will appear over the window specified when Show() is called. + // + // Args: + // * callback - fn { Go(fyne.URIWriteCloser) Go(error) } + // * parent - Go(fyne.Window) + // Result: + // * Go(*dialog.FileDialog) + "dialog-file-save": { + Doc: "dialog.NewFileSave", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val func(fyne.URIWriteCloser, error) + switch fn := arg0.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("dialog-file-save: arg 1: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg0Val = func(farg0 fyne.URIWriteCloser, farg1 error) { + var farg0Val, farg1Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URIWriteCloser)") + if farg1 != nil { + farg1Val = env.NewError(farg1.Error()) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-file-save: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-file-save: arg 1: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg1Val fyne.Window + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-file-save: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-file-save: arg 2: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-file-save: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-file-save: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := dialog.NewFileSave(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*dialog.FileDialog)") + return res0Obj + }, + }, + // dialog-folder-open creates a file dialog allowing the user to choose a folder to + // open. The callback function will run when the dialog closes. The URI will be + // nil when the user cancels or when nothing is selected. + // + // The dialog will appear over the window specified when Show() is called. + // + // Since: 1.4 + // + // Args: + // * callback - fn { Go(fyne.ListableURI) Go(error) } + // * parent - Go(fyne.Window) + // Result: + // * Go(*dialog.FileDialog) + "dialog-folder-open": { + Doc: "dialog.NewFolderOpen", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val func(fyne.ListableURI, error) + switch fn := arg0.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("dialog-folder-open: arg 1: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg0Val = func(farg0 fyne.ListableURI, farg1 error) { + var farg0Val, farg1Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.ListableURI)") + if farg1 != nil { + farg1Val = env.NewError(farg1.Error()) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-folder-open: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-folder-open: arg 1: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg1Val fyne.Window + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-folder-open: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-folder-open: arg 2: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-folder-open: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-folder-open: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := dialog.NewFolderOpen(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*dialog.FileDialog)") + return res0Obj + }, + }, + "dialog-form-dialog": { + Doc: "Create a new dialog.FormDialog struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &dialog.FormDialog{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*dialog.FormDialog)") + return resObj + }, + }, + // dialog-information creates a dialog over the specified window for user information. + // The title is used for the dialog window and message is the content. + // After creation you should call Show(). + // + // Args: + // * title - string + // * message - string + // * parent - Go(fyne.Window) + // Result: + // * Go(dialog.Dialog) + "dialog-information": { + Doc: "dialog.NewInformation", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-information: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-information: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.Window + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-information: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-information: arg 3: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-information: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-information: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := dialog.NewInformation(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(dialog.Dialog)") + return res0Obj + }, + }, + // dialog-progress creates a progress dialog and returns the handle. + // Using the returned type you should call Show() and then set its value through SetValue(). + // + // Deprecated: Use NewCustomWithoutButtons() and add a widget.ProgressBar() inside. + // + // Args: + // * title - string + // * message - string + // * parent - Go(fyne.Window) + // Result: + // * Go(*dialog.ProgressDialog) + "dialog-progress": { + Doc: "dialog.NewProgress", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-progress: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-progress: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.Window + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-progress: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-progress: arg 3: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-progress: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-progress: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := dialog.NewProgress(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*dialog.ProgressDialog)") + return res0Obj + }, + }, + "dialog-progress-dialog": { + Doc: "Create a new dialog.ProgressDialog struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &dialog.ProgressDialog{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*dialog.ProgressDialog)") + return resObj + }, + }, + // dialog-progress-infinite creates a infinite progress dialog and returns the handle. + // Using the returned type you should call Show(). + // + // Deprecated: Use NewCustomWithoutButtons() and add a widget.ProgressBarInfinite() inside. + // + // Args: + // * title - string + // * message - string + // * parent - Go(fyne.Window) + // Result: + // * Go(*dialog.ProgressInfiniteDialog) + "dialog-progress-infinite": { + Doc: "dialog.NewProgressInfinite", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-progress-infinite: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-progress-infinite: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.Window + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-progress-infinite: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-progress-infinite: arg 3: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-progress-infinite: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-progress-infinite: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := dialog.NewProgressInfinite(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*dialog.ProgressInfiniteDialog)") + return res0Obj + }, + }, + "dialog-progress-infinite-dialog": { + Doc: "Create a new dialog.ProgressInfiniteDialog struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &dialog.ProgressInfiniteDialog{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*dialog.ProgressInfiniteDialog)") + return resObj + }, + }, + // dialog-show-color-picker creates and shows a color dialog. + // The callback is triggered when the user selects a color. + // + // Since: 1.4 + // + // Args: + // * title - string + // * message - string + // * callback - fn { Go(color.Color) } + // * parent - Go(fyne.Window) + "dialog-show-color-picker": { + Doc: "dialog.ShowColorPicker", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-color-picker: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-color-picker: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val func(color.Color) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("dialog-show-color-picker: arg 3: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 color.Color) { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(color.Color)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-color-picker: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-color-picker: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg3Val fyne.Window + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-show-color-picker: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-color-picker: arg 4: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-color-picker: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-color-picker: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + dialog.ShowColorPicker(arg0Val, arg1Val, arg2Val, arg3Val) + return nil + }, + }, + // dialog-show-confirm shows a dialog over the specified window for a user + // confirmation. The title is used for the dialog window and message is the content. + // The callback is executed when the user decides. + // + // Args: + // * title - string + // * message - string + // * callback - fn { bool } + // * parent - Go(fyne.Window) + "dialog-show-confirm": { + Doc: "dialog.ShowConfirm", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-confirm: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-confirm: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val func(bool) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("dialog-show-confirm: arg 3: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 bool) { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-confirm: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-confirm: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg3Val fyne.Window + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-show-confirm: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-confirm: arg 4: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-confirm: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-confirm: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + dialog.ShowConfirm(arg0Val, arg1Val, arg2Val, arg3Val) + return nil + }, + }, + // dialog-show-custom shows a dialog over the specified application using custom + // content. The button will have the dismiss text set. + // The MinSize() of the CanvasObject passed will be used to set the size of the window. + // + // Args: + // * title - string + // * dismiss - string + // * content - Go(fyne.CanvasObject) + // * parent - Go(fyne.Window) + "dialog-show-custom": { + Doc: "dialog.ShowCustom", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-custom: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-custom: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.CanvasObject + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-show-custom: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-custom: arg 3: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-custom: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-custom: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg3Val fyne.Window + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-show-custom: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-custom: arg 4: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-custom: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-custom: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + dialog.ShowCustom(arg0Val, arg1Val, arg2Val, arg3Val) + return nil + }, + }, + // dialog-show-custom-without-buttons shows a dialog, wihout buttons, over the specified application + // using custom content. + // The MinSize() of the CanvasObject passed will be used to set the size of the window. + // + // Since: 2.4 + // + // Args: + // * title - string + // * content - Go(fyne.CanvasObject) + // * parent - Go(fyne.Window) + "dialog-show-custom-without-buttons": { + Doc: "dialog.ShowCustomWithoutButtons", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-custom-without-buttons: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-show-custom-without-buttons: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-custom-without-buttons: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-custom-without-buttons: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-custom-without-buttons: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Window + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-show-custom-without-buttons: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-custom-without-buttons: arg 3: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-custom-without-buttons: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-custom-without-buttons: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + dialog.ShowCustomWithoutButtons(arg0Val, arg1Val, arg2Val) + return nil + }, + }, + // dialog-show-entry-dialog creates a new entry dialog and shows it immediately. + // + // Deprecated: Use dialog.ShowForm() with a widget.Entry inside instead. + // + // Args: + // * title - string + // * message - string + // * on-confirm - fn { string } + // * parent - Go(fyne.Window) + "dialog-show-entry-dialog": { + Doc: "dialog.ShowEntryDialog", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-entry-dialog: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-entry-dialog: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val func(string) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("dialog-show-entry-dialog: arg 3: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-entry-dialog: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-entry-dialog: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg3Val fyne.Window + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-show-entry-dialog: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-entry-dialog: arg 4: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-entry-dialog: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-entry-dialog: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + dialog.ShowEntryDialog(arg0Val, arg1Val, arg2Val, arg3Val) + return nil + }, + }, + // dialog-show-error shows a dialog over the specified window for an application error. + // The message is extracted from the provided error (should not be nil). + // + // Args: + // * err - Go(error) + // * parent - Go(fyne.Window) + "dialog-show-error": { + Doc: "dialog.ShowError", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val error + switch v := arg0.(type) { + case env.String: + arg0Val = errors.New(v.Value) + case env.Error: + arg0Val = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-error: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-error: arg 1: " + "expected error, string or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Window + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-show-error: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-error: arg 2: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-error: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-error: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + dialog.ShowError(arg0Val, arg1Val) + return nil + }, + }, + // dialog-show-file-open creates and shows a file dialog allowing the user to choose a + // file to open. + // + // The callback function will run when the dialog closes and provide a reader for the chosen file. + // The reader will be nil when the user cancels or when nothing is selected. + // When the reader isn't nil it must be closed by the callback. + // + // The dialog will appear over the window specified. + // + // Args: + // * callback - fn { Go(fyne.URIReadCloser) Go(error) } + // * parent - Go(fyne.Window) + "dialog-show-file-open": { + Doc: "dialog.ShowFileOpen", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val func(fyne.URIReadCloser, error) + switch fn := arg0.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("dialog-show-file-open: arg 1: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg0Val = func(farg0 fyne.URIReadCloser, farg1 error) { + var farg0Val, farg1Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URIReadCloser)") + if farg1 != nil { + farg1Val = env.NewError(farg1.Error()) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-file-open: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-file-open: arg 1: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg1Val fyne.Window + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-show-file-open: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-file-open: arg 2: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-file-open: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-file-open: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + dialog.ShowFileOpen(arg0Val, arg1Val) + return nil + }, + }, + // dialog-show-file-save creates and shows a file dialog allowing the user to choose a + // file to save to (new or overwrite). If the user chooses an existing file they + // will be asked if they are sure. + // + // The callback function will run when the dialog closes and provide a writer for the chosen file. + // The writer will be nil when the user cancels or when nothing is selected. + // When the writer isn't nil it must be closed by the callback. + // + // The dialog will appear over the window specified. + // + // Args: + // * callback - fn { Go(fyne.URIWriteCloser) Go(error) } + // * parent - Go(fyne.Window) + "dialog-show-file-save": { + Doc: "dialog.ShowFileSave", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val func(fyne.URIWriteCloser, error) + switch fn := arg0.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("dialog-show-file-save: arg 1: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg0Val = func(farg0 fyne.URIWriteCloser, farg1 error) { + var farg0Val, farg1Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.URIWriteCloser)") + if farg1 != nil { + farg1Val = env.NewError(farg1.Error()) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-file-save: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-file-save: arg 1: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg1Val fyne.Window + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-show-file-save: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-file-save: arg 2: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-file-save: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-file-save: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + dialog.ShowFileSave(arg0Val, arg1Val) + return nil + }, + }, + // dialog-show-folder-open creates and shows a file dialog allowing the user to choose a + // folder to open. The callback function will run when the dialog closes. The + // URI will be nil when the user cancels or when nothing is selected. + // + // The dialog will appear over the window specified. + // + // Since: 1.4 + // + // Args: + // * callback - fn { Go(fyne.ListableURI) Go(error) } + // * parent - Go(fyne.Window) + "dialog-show-folder-open": { + Doc: "dialog.ShowFolderOpen", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val func(fyne.ListableURI, error) + switch fn := arg0.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("dialog-show-folder-open: arg 1: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg0Val = func(farg0 fyne.ListableURI, farg1 error) { + var farg0Val, farg1Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(fyne.ListableURI)") + if farg1 != nil { + farg1Val = env.NewError(farg1.Error()) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-folder-open: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-folder-open: arg 1: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg1Val fyne.Window + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-show-folder-open: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-folder-open: arg 2: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-folder-open: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-folder-open: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + dialog.ShowFolderOpen(arg0Val, arg1Val) + return nil + }, + }, + // dialog-show-information shows a dialog over the specified window for user information. + // The title is used for the dialog window and message is the content. + // + // Args: + // * title - string + // * message - string + // * parent - Go(fyne.Window) + "dialog-show-information": { + Doc: "dialog.ShowInformation", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-information: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-information: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.Window + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("dialog-show-information: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("dialog-show-information: arg 3: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("dialog-show-information: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("dialog-show-information: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + dialog.ShowInformation(arg0Val, arg1Val, arg2Val) + return nil + }, + }, + // Result: + // * integer + "build-debug": { + Doc: "Get fyne.BuildDebug value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.BuildDebug))) + return resObj + }, + }, + // Result: + // * integer + "build-release": { + Doc: "Get fyne.BuildRelease value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.BuildRelease))) + return resObj + }, + }, + // Result: + // * integer + "build-standard": { + Doc: "Get fyne.BuildStandard value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.BuildStandard))) + return resObj + }, + }, + // current-app returns the current application, for which there is only 1 per process. + // + // Result: + // * Go(fyne.App) + "current-app": { + Doc: "fyne.CurrentApp", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := fyne.CurrentApp() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.App)") + return res0Obj + }, + }, + // current-device returns the device information for the current hardware (via the driver) + // + // Result: + // * Go(fyne.Device) + "current-device": { + Doc: "fyne.CurrentDevice", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := fyne.CurrentDevice() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Device)") + return res0Obj + }, + }, + "fyne-driver-android-context": { + Doc: "Create a new fyne_driver.AndroidContext struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne_driver.AndroidContext{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne_driver.AndroidContext)") + return resObj + }, + }, + "fyne-driver-android-window-context": { + Doc: "Create a new fyne_driver.AndroidWindowContext struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne_driver.AndroidWindowContext{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne_driver.AndroidWindowContext)") + return resObj + }, + }, + "fyne-driver-mac-window-context": { + Doc: "Create a new fyne_driver.MacWindowContext struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne_driver.MacWindowContext{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne_driver.MacWindowContext)") + return resObj + }, + }, + "fyne-driver-unknown-context": { + Doc: "Create a new fyne_driver.UnknownContext struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne_driver.UnknownContext{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne_driver.UnknownContext)") + return resObj + }, + }, + "fyne-driver-wayland-window-context": { + Doc: "Create a new fyne_driver.WaylandWindowContext struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne_driver.WaylandWindowContext{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne_driver.WaylandWindowContext)") + return resObj + }, + }, + "fyne-driver-windows-window-context": { + Doc: "Create a new fyne_driver.WindowsWindowContext struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne_driver.WindowsWindowContext{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne_driver.WindowsWindowContext)") + return resObj + }, + }, + "fyne-driver-x-11-window-context": { + Doc: "Create a new fyne_driver.X11WindowContext struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne_driver.X11WindowContext{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne_driver.X11WindowContext)") + return resObj + }, + }, + // fyne-driver-run-native provides a way to execute code within the platform-specific runtime context for various runtimes. + // This is mostly useful for Android where the JVM provides functionality that is not accessible directly in CGo. + // The call for most platforms will just execute passing an `UnknownContext` and returning any error reported. + // + // Since: 2.3 + // + // Args: + // * fn - fn { Go(any) } -> Go(error) + // Result: + // * error + "fyne-driver-run-native": { + Doc: "fyne_driver.RunNative", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val func(any) error + switch fn := arg0.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("fyne-driver-run-native: arg 1: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg0Val = func(farg0 any) error { + var farg0Val env.Object + farg0Val = *env.NewNative(ps.Idx, farg0, "Go(any)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "fyne-driver-run-native: arg 1: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "fyne-driver-run-native: arg 1: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("fyne-driver-run-native: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("fyne-driver-run-native: arg 1: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + resErr := fyne_driver.RunNative(arg0Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return nil + }, + }, + // is-horizontal is a helper utility that determines if a passed orientation is horizontal + // + // Args: + // * orient - integer + // Result: + // * bool + "is-horizontal": { + Doc: "fyne.IsHorizontal", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.DeviceOrientation + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal fyne.DeviceOrientation + if natOk { + natVal, natValOk = nat.Value.(fyne.DeviceOrientation) + } + if natValOk { + arg0Val = natVal + } else { + var u int + if vc, ok := arg0.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("is-horizontal: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = fyne.DeviceOrientation(u) + } + } + res0 := fyne.IsHorizontal(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // is-vertical is a helper utility that determines if a passed orientation is vertical + // + // Args: + // * orient - integer + // Result: + // * bool + "is-vertical": { + Doc: "fyne.IsVertical", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.DeviceOrientation + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal fyne.DeviceOrientation + if natOk { + natVal, natValOk = nat.Value.(fyne.DeviceOrientation) + } + if natValOk { + arg0Val = natVal + } else { + var u int + if vc, ok := arg0.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("is-vertical: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = fyne.DeviceOrientation(u) + } + } + res0 := fyne.IsVertical(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // Result: + // * string + "key-0": { + Doc: "Get fyne.Key0 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.Key0)) + return resObj + }, + }, + // Result: + // * string + "key-1": { + Doc: "Get fyne.Key1 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.Key1)) + return resObj + }, + }, + // Result: + // * string + "key-2": { + Doc: "Get fyne.Key2 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.Key2)) + return resObj + }, + }, + // Result: + // * string + "key-3": { + Doc: "Get fyne.Key3 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.Key3)) + return resObj + }, + }, + // Result: + // * string + "key-4": { + Doc: "Get fyne.Key4 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.Key4)) + return resObj + }, + }, + // Result: + // * string + "key-5": { + Doc: "Get fyne.Key5 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.Key5)) + return resObj + }, + }, + // Result: + // * string + "key-6": { + Doc: "Get fyne.Key6 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.Key6)) + return resObj + }, + }, + // Result: + // * string + "key-7": { + Doc: "Get fyne.Key7 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.Key7)) + return resObj + }, + }, + // Result: + // * string + "key-8": { + Doc: "Get fyne.Key8 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.Key8)) + return resObj + }, + }, + // Result: + // * string + "key-9": { + Doc: "Get fyne.Key9 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.Key9)) + return resObj + }, + }, + // Result: + // * string + "key-a": { + Doc: "Get fyne.KeyA value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyA)) + return resObj + }, + }, + // Result: + // * string + "key-apostrophe": { + Doc: "Get fyne.KeyApostrophe value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyApostrophe)) + return resObj + }, + }, + // Result: + // * string + "key-asterisk": { + Doc: "Get fyne.KeyAsterisk value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyAsterisk)) + return resObj + }, + }, + // Result: + // * string + "key-b": { + Doc: "Get fyne.KeyB value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyB)) + return resObj + }, + }, + // Result: + // * string + "key-back-tick": { + Doc: "Get fyne.KeyBackTick value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyBackTick)) + return resObj + }, + }, + // Result: + // * string + "key-backslash": { + Doc: "Get fyne.KeyBackslash value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyBackslash)) + return resObj + }, + }, + // Result: + // * string + "key-backspace": { + Doc: "Get fyne.KeyBackspace value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyBackspace)) + return resObj + }, + }, + // Result: + // * string + "key-c": { + Doc: "Get fyne.KeyC value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyC)) + return resObj + }, + }, + // Result: + // * string + "key-comma": { + Doc: "Get fyne.KeyComma value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyComma)) + return resObj + }, + }, + // Result: + // * string + "key-d": { + Doc: "Get fyne.KeyD value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyD)) + return resObj + }, + }, + // Result: + // * string + "key-delete": { + Doc: "Get fyne.KeyDelete value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyDelete)) + return resObj + }, + }, + // Result: + // * string + "key-down": { + Doc: "Get fyne.KeyDown value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyDown)) + return resObj + }, + }, + // Result: + // * string + "key-e": { + Doc: "Get fyne.KeyE value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyE)) + return resObj + }, + }, + // Result: + // * string + "key-end": { + Doc: "Get fyne.KeyEnd value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyEnd)) + return resObj + }, + }, + // Result: + // * string + "key-enter": { + Doc: "Get fyne.KeyEnter value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyEnter)) + return resObj + }, + }, + // Result: + // * string + "key-equal": { + Doc: "Get fyne.KeyEqual value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyEqual)) + return resObj + }, + }, + // Result: + // * string + "key-escape": { + Doc: "Get fyne.KeyEscape value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyEscape)) + return resObj + }, + }, + // Result: + // * string + "key-f": { + Doc: "Get fyne.KeyF value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyF)) + return resObj + }, + }, + // Result: + // * string + "key-f-1": { + Doc: "Get fyne.KeyF1 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyF1)) + return resObj + }, + }, + // Result: + // * string + "key-f-10": { + Doc: "Get fyne.KeyF10 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyF10)) + return resObj + }, + }, + // Result: + // * string + "key-f-11": { + Doc: "Get fyne.KeyF11 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyF11)) + return resObj + }, + }, + // Result: + // * string + "key-f-12": { + Doc: "Get fyne.KeyF12 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyF12)) + return resObj + }, + }, + // Result: + // * string + "key-f-2": { + Doc: "Get fyne.KeyF2 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyF2)) + return resObj + }, + }, + // Result: + // * string + "key-f-3": { + Doc: "Get fyne.KeyF3 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyF3)) + return resObj + }, + }, + // Result: + // * string + "key-f-4": { + Doc: "Get fyne.KeyF4 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyF4)) + return resObj + }, + }, + // Result: + // * string + "key-f-5": { + Doc: "Get fyne.KeyF5 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyF5)) + return resObj + }, + }, + // Result: + // * string + "key-f-6": { + Doc: "Get fyne.KeyF6 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyF6)) + return resObj + }, + }, + // Result: + // * string + "key-f-7": { + Doc: "Get fyne.KeyF7 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyF7)) + return resObj + }, + }, + // Result: + // * string + "key-f-8": { + Doc: "Get fyne.KeyF8 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyF8)) + return resObj + }, + }, + // Result: + // * string + "key-f-9": { + Doc: "Get fyne.KeyF9 value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyF9)) + return resObj + }, + }, + // Result: + // * string + "key-g": { + Doc: "Get fyne.KeyG value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyG)) + return resObj + }, + }, + // Result: + // * string + "key-h": { + Doc: "Get fyne.KeyH value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyH)) + return resObj + }, + }, + // Result: + // * string + "key-home": { + Doc: "Get fyne.KeyHome value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyHome)) + return resObj + }, + }, + // Result: + // * string + "key-i": { + Doc: "Get fyne.KeyI value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyI)) + return resObj + }, + }, + // Result: + // * string + "key-insert": { + Doc: "Get fyne.KeyInsert value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyInsert)) + return resObj + }, + }, + // Result: + // * string + "key-j": { + Doc: "Get fyne.KeyJ value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyJ)) + return resObj + }, + }, + // Result: + // * string + "key-k": { + Doc: "Get fyne.KeyK value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyK)) + return resObj + }, + }, + // Result: + // * string + "key-l": { + Doc: "Get fyne.KeyL value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyL)) + return resObj + }, + }, + // Result: + // * string + "key-left": { + Doc: "Get fyne.KeyLeft value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyLeft)) + return resObj + }, + }, + // Result: + // * string + "key-left-bracket": { + Doc: "Get fyne.KeyLeftBracket value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyLeftBracket)) + return resObj + }, + }, + // Result: + // * string + "key-m": { + Doc: "Get fyne.KeyM value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyM)) + return resObj + }, + }, + // Result: + // * string + "key-minus": { + Doc: "Get fyne.KeyMinus value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyMinus)) + return resObj + }, + }, + // Result: + // * integer + "key-modifier-alt": { + Doc: "Get fyne.KeyModifierAlt value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.KeyModifierAlt))) + return resObj + }, + }, + // Result: + // * integer + "key-modifier-control": { + Doc: "Get fyne.KeyModifierControl value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.KeyModifierControl))) + return resObj + }, + }, + // Result: + // * integer + "key-modifier-shift": { + Doc: "Get fyne.KeyModifierShift value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.KeyModifierShift))) + return resObj + }, + }, + // Result: + // * integer + "key-modifier-super": { + Doc: "Get fyne.KeyModifierSuper value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.KeyModifierSuper))) + return resObj + }, + }, + // Result: + // * string + "key-n": { + Doc: "Get fyne.KeyN value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyN)) + return resObj + }, + }, + // Result: + // * string + "key-o": { + Doc: "Get fyne.KeyO value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyO)) + return resObj + }, + }, + // Result: + // * string + "key-p": { + Doc: "Get fyne.KeyP value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyP)) + return resObj + }, + }, + // Result: + // * string + "key-page-down": { + Doc: "Get fyne.KeyPageDown value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyPageDown)) + return resObj + }, + }, + // Result: + // * string + "key-page-up": { + Doc: "Get fyne.KeyPageUp value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyPageUp)) + return resObj + }, + }, + // Result: + // * string + "key-period": { + Doc: "Get fyne.KeyPeriod value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyPeriod)) + return resObj + }, + }, + // Result: + // * string + "key-plus": { + Doc: "Get fyne.KeyPlus value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyPlus)) + return resObj + }, + }, + // Result: + // * string + "key-q": { + Doc: "Get fyne.KeyQ value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyQ)) + return resObj + }, + }, + // Result: + // * string + "key-r": { + Doc: "Get fyne.KeyR value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyR)) + return resObj + }, + }, + // Result: + // * string + "key-return": { + Doc: "Get fyne.KeyReturn value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyReturn)) + return resObj + }, + }, + // Result: + // * string + "key-right": { + Doc: "Get fyne.KeyRight value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyRight)) + return resObj + }, + }, + // Result: + // * string + "key-right-bracket": { + Doc: "Get fyne.KeyRightBracket value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyRightBracket)) + return resObj + }, + }, + // Result: + // * string + "key-s": { + Doc: "Get fyne.KeyS value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyS)) + return resObj + }, + }, + // Result: + // * string + "key-semicolon": { + Doc: "Get fyne.KeySemicolon value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeySemicolon)) + return resObj + }, + }, + // Result: + // * string + "key-slash": { + Doc: "Get fyne.KeySlash value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeySlash)) + return resObj + }, + }, + // Result: + // * string + "key-space": { + Doc: "Get fyne.KeySpace value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeySpace)) + return resObj + }, + }, + // Result: + // * string + "key-t": { + Doc: "Get fyne.KeyT value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyT)) + return resObj + }, + }, + // Result: + // * string + "key-tab": { + Doc: "Get fyne.KeyTab value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyTab)) + return resObj + }, + }, + // Result: + // * string + "key-u": { + Doc: "Get fyne.KeyU value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyU)) + return resObj + }, + }, + // Result: + // * string + "key-unknown": { + Doc: "Get fyne.KeyUnknown value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyUnknown)) + return resObj + }, + }, + // Result: + // * string + "key-up": { + Doc: "Get fyne.KeyUp value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyUp)) + return resObj + }, + }, + // Result: + // * string + "key-v": { + Doc: "Get fyne.KeyV value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyV)) + return resObj + }, + }, + // Result: + // * string + "key-w": { + Doc: "Get fyne.KeyW value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyW)) + return resObj + }, + }, + // Result: + // * string + "key-x": { + Doc: "Get fyne.KeyX value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyX)) + return resObj + }, + }, + // Result: + // * string + "key-y": { + Doc: "Get fyne.KeyY value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyY)) + return resObj + }, + }, + // Result: + // * string + "key-z": { + Doc: "Get fyne.KeyZ value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(fyne.KeyZ)) + return resObj + }, + }, + // load-resource-from-path creates a new [StaticResource] in memory using the contents of the specified file. + // + // Args: + // * path - string + // Result: + // * Go(fyne.Resource) + // * error + "load-resource-from-path": { + Doc: "fyne.LoadResourceFromPath", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("load-resource-from-path: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0, resErr := fyne.LoadResourceFromPath(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // load-resource-from-url-string creates a new [StaticResource] in memory using the body of the specified URL. + // + // Args: + // * url-str - string + // Result: + // * Go(fyne.Resource) + // * error + "load-resource-from-url-string": { + Doc: "fyne.LoadResourceFromURLString", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("load-resource-from-url-string: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0, resErr := fyne.LoadResourceFromURLString(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // log-error reports an error to the command line with the specified err cause, + // if not nil. + // The function also reports basic information about the code location. + // + // Args: + // * reason - string + // * err - Go(error) + "log-error": { + Doc: "fyne.LogError", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("log-error: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val error + switch v := arg1.(type) { + case env.String: + arg1Val = errors.New(v.Value) + case env.Error: + arg1Val = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("log-error: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("log-error: arg 2: " + "expected error, string or nil, but got " + objectDebugString(ps.Idx, v)) + } + fyne.LogError(arg0Val, arg1Val) + return nil + }, + }, + // max returns the larger of the passed values. + // + // Args: + // * x - decimal + // * y - decimal + // Result: + // * decimal + "max": { + Doc: "fyne.Max", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float32 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("max: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val float32 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("max: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := fyne.Max(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // measure-text uses the current driver to calculate the size of text when rendered. + // The font used will be read from the current app's theme. + // + // Args: + // * text - string + // * size - decimal + // * style - Go(fyne.TextStyle) + // Result: + // * Go(fyne.Size) + "measure-text": { + Doc: "fyne.MeasureText", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("measure-text: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val float32 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("measure-text: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.TextStyle + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("measure-text: arg 3: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("measure-text: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := fyne.MeasureText(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // min returns the smaller of the passed values. + // + // Args: + // * x - decimal + // * y - decimal + // Result: + // * decimal + "min": { + Doc: "fyne.Min", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float32 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("min: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val float32 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("min: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := fyne.Min(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // animation creates a very basic animation where the callback function will be called for every + // rendered frame between [time.Now] and the specified duration. The callback values start at 0.0 and + // will be 1.0 when the animation completes. + // + // Since: 2.0 + // + // Args: + // * d - Go(time.Duration) + // * fn - fn { decimal } + // Result: + // * Go(*fyne.Animation) + "animation": { + Doc: "fyne.NewAnimation", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val time.Duration + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(time.Duration); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("animation: arg 1: " + "expected native of type time.Duration, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("animation: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(float32) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("animation: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 float32) { + var farg0Val env.Object + farg0Val = *env.NewDecimal(float64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("animation: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("animation: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := fyne.NewAnimation(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Animation)") + return res0Obj + }, + }, + "app-metadata": { + Doc: "Create a new fyne.AppMetadata struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne.AppMetadata{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne.AppMetadata)") + return resObj + }, + }, + // container returns a new [Container] instance holding the specified [CanvasObject]s. + // + // Deprecated: Use [fyne.io/fyne/v2/container.NewWithoutLayout] to create a container that uses manual layout. + // + // Args: + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "container": { + Doc: "fyne.NewContainer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []fyne.CanvasObject + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("container: arg 1: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("container: arg 1: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("container: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("container: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("container: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("container: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := fyne.NewContainer(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // container-with-layout returns a new [Container] instance holding the specified + // [CanvasObject]s which will be laid out according to the specified Layout. + // + // Deprecated: Use [fyne.io/fyne/v2/container.New] instead. + // + // Args: + // * layout - Go(fyne.Layout) + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "container-with-layout": { + Doc: "fyne.NewContainerWithLayout", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Layout + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Layout(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("container-with-layout: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Layout); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("container-with-layout: arg 1: " + "expected native of type fyne.Layout, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("container-with-layout: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("container-with-layout: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val []fyne.CanvasObject + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("container-with-layout: arg 2: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("container-with-layout: arg 2: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("container-with-layout: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("container-with-layout: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("container-with-layout: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("container-with-layout: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := fyne.NewContainerWithLayout(arg0Val, arg1Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // container-without-layout returns a new [Container] instance holding the specified + // [CanvasObject]s that are manually arranged. + // + // Deprecated: Use [fyne.io/fyne/v2/container.NewWithoutLayout] instead. + // + // Args: + // * objects - block[Go(fyne.CanvasObject)] + // Result: + // * Go(*fyne.Container) + "container-without-layout": { + Doc: "fyne.NewContainerWithoutLayout", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []fyne.CanvasObject + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]fyne.CanvasObject, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("container-without-layout: arg 1: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("container-without-layout: arg 1: " + "block item: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("container-without-layout: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("container-without-layout: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("container-without-layout: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("container-without-layout: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := fyne.NewContainerWithoutLayout(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Container)") + return res0Obj + }, + }, + // delta returns a newly allocated [Delta] representing a movement in the X and Y axis. + // + // Args: + // * dx - decimal + // * dy - decimal + // Result: + // * Go(fyne.Delta) + "delta": { + Doc: "fyne.NewDelta", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float32 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("delta: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val float32 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("delta: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := fyne.NewDelta(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Delta)") + return res0Obj + }, + }, + "drag-event": { + Doc: "Create a new fyne.DragEvent struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne.DragEvent{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne.DragEvent)") + return resObj + }, + }, + "hardware-key": { + Doc: "Create a new fyne.HardwareKey struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne.HardwareKey{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne.HardwareKey)") + return resObj + }, + }, + "key-event": { + Doc: "Create a new fyne.KeyEvent struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne.KeyEvent{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne.KeyEvent)") + return resObj + }, + }, + // main-menu creates a top level menu structure used by fyne.Window for displaying a menubar + // (or appropriate equivalent). + // + // Args: + // * items - block[Go(*fyne.Menu)] + // Result: + // * Go(*fyne.MainMenu) + "main-menu": { + Doc: "fyne.NewMainMenu", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []*fyne.Menu + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]*fyne.Menu, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Menu); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("main-menu: arg 1: " + "block item: " + "expected native of type *fyne.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("main-menu: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("main-menu: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("main-menu: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("main-menu: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := fyne.NewMainMenu(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.MainMenu)") + return res0Obj + }, + }, + // menu creates a new menu given the specified label (to show in a [MainMenu]) and list of items to display. + // + // Args: + // * label - string + // * items - block[Go(*fyne.MenuItem)] + // Result: + // * Go(*fyne.Menu) + "menu": { + Doc: "fyne.NewMenu", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("menu: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val []*fyne.MenuItem + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]*fyne.MenuItem, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.MenuItem); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("menu: arg 2: " + "block item: " + "expected native of type *fyne.MenuItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("menu: arg 2: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("menu: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("menu: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("menu: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := fyne.NewMenu(arg0Val, arg1Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Menu)") + return res0Obj + }, + }, + // menu-item creates a new menu item from the passed label and action parameters. + // + // Args: + // * label - string + // * action - fn { } + // Result: + // * Go(*fyne.MenuItem) + "menu-item": { + Doc: "fyne.NewMenuItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("menu-item: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("menu-item: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("menu-item: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("menu-item: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := fyne.NewMenuItem(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.MenuItem)") + return res0Obj + }, + }, + // menu-item-separator creates a menu item that is to be used as a separator. + // + // Result: + // * Go(*fyne.MenuItem) + "menu-item-separator": { + Doc: "fyne.NewMenuItemSeparator", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := fyne.NewMenuItemSeparator() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.MenuItem)") + return res0Obj + }, + }, + // notification creates a notification that can be passed to [App.SendNotification]. + // + // Args: + // * title - string + // * content - string + // Result: + // * Go(*fyne.Notification) + "notification": { + Doc: "fyne.NewNotification", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("notification: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("notification: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := fyne.NewNotification(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.Notification)") + return res0Obj + }, + }, + "point-event": { + Doc: "Create a new fyne.PointEvent struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne.PointEvent{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne.PointEvent)") + return resObj + }, + }, + // pos returns a newly allocated [Position] representing the specified coordinates. + // + // Args: + // * x - decimal + // * y - decimal + // Result: + // * Go(fyne.Position) + "pos": { + Doc: "fyne.NewPos", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float32 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("pos: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val float32 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("pos: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := fyne.NewPos(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + "position": { + Doc: "Create a new fyne.Position struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne.Position{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne.Position)") + return resObj + }, + }, + "scroll-event": { + Doc: "Create a new fyne.ScrollEvent struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne.ScrollEvent{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne.ScrollEvent)") + return resObj + }, + }, + "shortcut-copy": { + Doc: "Create a new fyne.ShortcutCopy struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne.ShortcutCopy{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne.ShortcutCopy)") + return resObj + }, + }, + "shortcut-cut": { + Doc: "Create a new fyne.ShortcutCut struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne.ShortcutCut{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne.ShortcutCut)") + return resObj + }, + }, + "shortcut-handler": { + Doc: "Create a new fyne.ShortcutHandler struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne.ShortcutHandler{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne.ShortcutHandler)") + return resObj + }, + }, + "shortcut-paste": { + Doc: "Create a new fyne.ShortcutPaste struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne.ShortcutPaste{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne.ShortcutPaste)") + return resObj + }, + }, + "shortcut-redo": { + Doc: "Create a new fyne.ShortcutRedo struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne.ShortcutRedo{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne.ShortcutRedo)") + return resObj + }, + }, + "shortcut-select-all": { + Doc: "Create a new fyne.ShortcutSelectAll struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne.ShortcutSelectAll{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne.ShortcutSelectAll)") + return resObj + }, + }, + "shortcut-undo": { + Doc: "Create a new fyne.ShortcutUndo struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne.ShortcutUndo{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne.ShortcutUndo)") + return resObj + }, + }, + // size returns a newly allocated Size of the specified dimensions. + // + // Args: + // * w - decimal + // * h - decimal + // Result: + // * Go(fyne.Size) + "size": { + Doc: "fyne.NewSize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float32 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("size: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val float32 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("size: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := fyne.NewSize(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // square-offset-pos returns a newly allocated [Position] with the same x and y position. + // + // Since: 2.4 + // + // Args: + // * length - decimal + // Result: + // * Go(fyne.Position) + "square-offset-pos": { + Doc: "fyne.NewSquareOffsetPos", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float32 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("square-offset-pos: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := fyne.NewSquareOffsetPos(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Position)") + return res0Obj + }, + }, + // square-size returns a newly allocated Size with the same width and height. + // + // Since: 2.4 + // + // Args: + // * side - decimal + // Result: + // * Go(fyne.Size) + "square-size": { + Doc: "fyne.NewSquareSize", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float32 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("square-size: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := fyne.NewSquareSize(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, &res0, "Go(*fyne.Size)") + return res0Obj + }, + }, + // static-resource returns a new static resource object with the specified + // name and content. Creating a new static resource in memory results in + // sharable binary data that may be serialised to the system cache location. + // + // Args: + // * name - string + // * content - block[integer] + // Result: + // * Go(*fyne.StaticResource) + "static-resource": { + Doc: "fyne.NewStaticResource", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("static-resource: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val []byte + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("static-resource: arg 2: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("static-resource: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("static-resource: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := fyne.NewStaticResource(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*fyne.StaticResource)") + return res0Obj + }, + }, + "text-style": { + Doc: "Create a new fyne.TextStyle struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &fyne.TextStyle{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*fyne.TextStyle)") + return resObj + }, + }, + // Result: + // * integer + "orientation-horizontal-left": { + Doc: "Get fyne.OrientationHorizontalLeft value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.OrientationHorizontalLeft))) + return resObj + }, + }, + // Result: + // * integer + "orientation-horizontal-right": { + Doc: "Get fyne.OrientationHorizontalRight value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.OrientationHorizontalRight))) + return resObj + }, + }, + // Result: + // * integer + "orientation-vertical": { + Doc: "Get fyne.OrientationVertical value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.OrientationVertical))) + return resObj + }, + }, + // Result: + // * integer + "orientation-vertical-upside-down": { + Doc: "Get fyne.OrientationVerticalUpsideDown value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.OrientationVerticalUpsideDown))) + return resObj + }, + }, + // set-current-app is an internal function to set the app instance currently running. + // + // Args: + // * current - Go(fyne.App) + "set-current-app": { + Doc: "fyne.SetCurrentApp", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.App + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_App(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("set-current-app: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.App); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("set-current-app: arg 1: " + "expected native of type fyne.App, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("set-current-app: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("set-current-app: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + fyne.SetCurrentApp(arg0Val) + return nil + }, + }, + // Result: + // * integer + "text-align-center": { + Doc: "Get fyne.TextAlignCenter value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.TextAlignCenter))) + return resObj + }, + }, + // Result: + // * integer + "text-align-leading": { + Doc: "Get fyne.TextAlignLeading value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.TextAlignLeading))) + return resObj + }, + }, + // Result: + // * integer + "text-align-trailing": { + Doc: "Get fyne.TextAlignTrailing value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.TextAlignTrailing))) + return resObj + }, + }, + // Result: + // * integer + "text-truncate": { + Doc: "Get fyne.TextTruncate value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.TextTruncate))) + return resObj + }, + }, + // Result: + // * integer + "text-truncate-clip": { + Doc: "Get fyne.TextTruncateClip value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.TextTruncateClip))) + return resObj + }, + }, + // Result: + // * integer + "text-truncate-ellipsis": { + Doc: "Get fyne.TextTruncateEllipsis value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.TextTruncateEllipsis))) + return resObj + }, + }, + // Result: + // * integer + "text-truncate-off": { + Doc: "Get fyne.TextTruncateOff value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.TextTruncateOff))) + return resObj + }, + }, + // Result: + // * integer + "text-wrap-break": { + Doc: "Get fyne.TextWrapBreak value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.TextWrapBreak))) + return resObj + }, + }, + // Result: + // * integer + "text-wrap-off": { + Doc: "Get fyne.TextWrapOff value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.TextWrapOff))) + return resObj + }, + }, + // Result: + // * integer + "text-wrap-word": { + Doc: "Get fyne.TextWrapWord value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(fyne.TextWrapWord))) + return resObj + }, + }, + // lang-add-translations allows an app to load a bundle of translations. + // The language that this relates to will be inferred from the resource name, for example "fr.json". + // The data should be in json format. + // + // Args: + // * r - Go(fyne.Resource) + // Result: + // * error + "lang-add-translations": { + Doc: "lang.AddTranslations", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Resource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("lang-add-translations: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("lang-add-translations: arg 1: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("lang-add-translations: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("lang-add-translations: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := lang.AddTranslations(arg0Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return nil + }, + }, + // lang-add-translations-for-locale allows an app to load a bundle of translations for a specified locale. + // The data should be in json format. + // + // Args: + // * data - block[integer] + // * l - Go(fyne.Locale) + // Result: + // * error + "lang-add-translations-for-locale": { + Doc: "lang.AddTranslationsForLocale", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []byte + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]byte, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + if vc, ok := it.(env.Integer); ok { + (*iv) = byte(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("lang-add-translations-for-locale: arg 1: " + "block item: " + "expected integer, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("lang-add-translations-for-locale: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("lang-add-translations-for-locale: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Locale + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.Locale + if natOk { + natVal, natValOk = nat.Value.(fyne.Locale) + } + if natValOk { + arg1Val = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("lang-add-translations-for-locale: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = fyne.Locale(u) + } + } + resErr := lang.AddTranslationsForLocale(arg0Val, arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return nil + }, + }, + // lang-add-translations-fs supports adding all translations in one calling using an `embed.FS` setup. + // The `dir` parameter specifies the name or path of the directory containing translation files + // inside this embedded filesystem. + // Each file should be a json file with the name following pattern [prefix.]lang.json. + // + // Args: + // * fs - Go(embed.FS) + // * dir - string + // Result: + // * error + "lang-add-translations-fs": { + Doc: "lang.AddTranslationsFS", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val embed.FS + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(embed.FS); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("lang-add-translations-fs: arg 1: " + "expected native of type embed.FS, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("lang-add-translations-fs: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("lang-add-translations-fs: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + resErr := lang.AddTranslationsFS(arg0Val, arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return nil + }, + }, + // lang-localize asks the translation engine to translate a string, this behaves like the gettext "_" function. + // The string can be templated and the template data can be passed as a struct with exported fields, + // or as a map of string keys to any suitable value. + // + // Args: + // * in - string + // * data - block[Go(any)] + // Result: + // * string + "lang-localize": { + Doc: "lang.Localize", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("lang-localize: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val []any + switch v := arg1.(type) { + case env.Block: + arg1Val = make([]any, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg1Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("lang-localize: arg 2: " + "block item: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("lang-localize: arg 2: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("lang-localize: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("lang-localize: arg 2: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := lang.Localize(arg0Val, arg1Val...) + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // lang-localize-key asks the translation engine for the translation with specific ID. + // If it cannot be found then the fallback will be used. + // The string can be templated and the template data can be passed as a struct with exported fields, + // or as a map of string keys to any suitable value. + // + // Args: + // * key - string + // * fallback - string + // * data - block[Go(any)] + // Result: + // * string + "lang-localize-key": { + Doc: "lang.LocalizeKey", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("lang-localize-key: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("lang-localize-key: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val []any + switch v := arg2.(type) { + case env.Block: + arg2Val = make([]any, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg2Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("lang-localize-key: arg 3: " + "block item: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("lang-localize-key: arg 3: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("lang-localize-key: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("lang-localize-key: arg 3: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := lang.LocalizeKey(arg0Val, arg1Val, arg2Val...) + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // lang-localize-plural asks the translation engine to translate a string from one of a number of plural forms. + // This behaves like the ngettext function, with the `count` parameter determining the plurality looked up. + // The string can be templated and the template data can be passed as a struct with exported fields, + // or as a map of string keys to any suitable value. + // + // Args: + // * in - string + // * count - integer + // * data - block[Go(any)] + // Result: + // * string + "lang-localize-plural": { + Doc: "lang.LocalizePlural", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("lang-localize-plural: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val int + if vc, ok := arg1.(env.Integer); ok { + arg1Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("lang-localize-plural: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val []any + switch v := arg2.(type) { + case env.Block: + arg2Val = make([]any, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg2Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("lang-localize-plural: arg 3: " + "block item: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("lang-localize-plural: arg 3: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("lang-localize-plural: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("lang-localize-plural: arg 3: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := lang.LocalizePlural(arg0Val, arg1Val, arg2Val...) + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // lang-localize-plural-key asks the translation engine for the translation with specific ID in plural form. + // This behaves like the npgettext function, with the `count` parameter determining the plurality looked up. + // If it cannot be found then the fallback will be used. + // The string can be templated and the template data can be passed as a struct with exported fields, + // or as a map of string keys to any suitable value. + // + // Args: + // * key - string + // * fallback - string + // * count - integer + // * data - block[Go(any)] + // Result: + // * string + "lang-localize-plural-key": { + Doc: "lang.LocalizePluralKey", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("lang-localize-plural-key: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("lang-localize-plural-key: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val int + if vc, ok := arg2.(env.Integer); ok { + arg2Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("lang-localize-plural-key: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val []any + switch v := arg3.(type) { + case env.Block: + arg3Val = make([]any, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg3Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("lang-localize-plural-key: arg 4: " + "block item: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("lang-localize-plural-key: arg 4: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("lang-localize-plural-key: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("lang-localize-plural-key: arg 4: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := lang.LocalizePluralKey(arg0Val, arg1Val, arg2Val, arg3Val...) + var res0Obj env.Object + res0Obj = *env.NewString(res0) + return res0Obj + }, + }, + // lang-system-locale returns the primary locale on the current system. + // This may refer to a language that Fyne does not have translations for. + // + // Result: + // * Go(fyne.Locale) + "lang-system-locale": { + Doc: "lang.SystemLocale", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := lang.SystemLocale() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(fyne.Locale)") + return res0Obj + }, + }, + // layout-adaptive-grid-layout returns a new grid layout which uses columns when horizontal but rows when vertical. + // + // Args: + // * rowcols - integer + // Result: + // * Go(fyne.Layout) + "layout-adaptive-grid-layout": { + Doc: "layout.NewAdaptiveGridLayout", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val int + if vc, ok := arg0.(env.Integer); ok { + arg0Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("layout-adaptive-grid-layout: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := layout.NewAdaptiveGridLayout(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // layout-border-layout creates a new BorderLayout instance with top, bottom, left + // and right objects set. All other items in the container will fill the remaining space in the middle. + // Multiple extra items will be stacked in the specified order as a Stack container. + // + // Args: + // * top - Go(fyne.CanvasObject) + // * bottom - Go(fyne.CanvasObject) + // * left - Go(fyne.CanvasObject) + // * right - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.Layout) + "layout-border-layout": { + Doc: "layout.NewBorderLayout", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.CanvasObject + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 3: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg3Val fyne.CanvasObject + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 4: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("layout-border-layout: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := layout.NewBorderLayout(arg0Val, arg1Val, arg2Val, arg3Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // layout-center-layout creates a new CenterLayout instance + // + // Result: + // * Go(fyne.Layout) + "layout-center-layout": { + Doc: "layout.NewCenterLayout", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := layout.NewCenterLayout() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // layout-custom-padded-h-box-layout returns a layout similar to HBoxLayout that uses a custom + // amount of padding in between objects instead of the theme.Padding value. + // + // Since: 2.5 + // + // Args: + // * padding - decimal + // Result: + // * Go(fyne.Layout) + "layout-custom-padded-h-box-layout": { + Doc: "layout.NewCustomPaddedHBoxLayout", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float32 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("layout-custom-padded-h-box-layout: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := layout.NewCustomPaddedHBoxLayout(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // layout-custom-padded-layout creates a new CustomPaddedLayout instance + // with the specified paddings. + // + // Since: 2.5 + // + // Args: + // * pad-top - decimal + // * pad-bottom - decimal + // * pad-left - decimal + // * pad-right - decimal + // Result: + // * Go(fyne.Layout) + "layout-custom-padded-layout": { + Doc: "layout.NewCustomPaddedLayout", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float32 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("layout-custom-padded-layout: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val float32 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("layout-custom-padded-layout: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val float32 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("layout-custom-padded-layout: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val float32 + if vc, ok := arg3.(env.Decimal); ok { + arg3Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("layout-custom-padded-layout: arg 4: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg3)) + } + res0 := layout.NewCustomPaddedLayout(arg0Val, arg1Val, arg2Val, arg3Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // layout-custom-padded-v-box-layout returns a layout similar to VBoxLayout that uses a custom + // amount of padding in between objects instead of the theme.Padding value. + // + // Since: 2.5 + // + // Args: + // * padding - decimal + // Result: + // * Go(fyne.Layout) + "layout-custom-padded-v-box-layout": { + Doc: "layout.NewCustomPaddedVBoxLayout", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float32 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("layout-custom-padded-v-box-layout: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := layout.NewCustomPaddedVBoxLayout(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // layout-form-layout returns a new FormLayout instance + // + // Result: + // * Go(fyne.Layout) + "layout-form-layout": { + Doc: "layout.NewFormLayout", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := layout.NewFormLayout() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // layout-grid-layout returns a grid layout arranged in a specified number of columns. + // The number of rows will depend on how many children are in the container that uses this layout. + // + // Args: + // * cols - integer + // Result: + // * Go(fyne.Layout) + "layout-grid-layout": { + Doc: "layout.NewGridLayout", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val int + if vc, ok := arg0.(env.Integer); ok { + arg0Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("layout-grid-layout: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := layout.NewGridLayout(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // layout-grid-layout-with-columns returns a new grid layout that specifies a column count and wrap to new rows when needed. + // + // Args: + // * cols - integer + // Result: + // * Go(fyne.Layout) + "layout-grid-layout-with-columns": { + Doc: "layout.NewGridLayoutWithColumns", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val int + if vc, ok := arg0.(env.Integer); ok { + arg0Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("layout-grid-layout-with-columns: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := layout.NewGridLayoutWithColumns(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // layout-grid-layout-with-rows returns a new grid layout that specifies a row count that creates new rows as required. + // + // Args: + // * rows - integer + // Result: + // * Go(fyne.Layout) + "layout-grid-layout-with-rows": { + Doc: "layout.NewGridLayoutWithRows", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val int + if vc, ok := arg0.(env.Integer); ok { + arg0Val = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("layout-grid-layout-with-rows: arg 1: " + "expected integer, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := layout.NewGridLayoutWithRows(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // layout-grid-wrap-layout returns a new GridWrapLayout instance + // + // Args: + // * size - Go(fyne.Size) + // Result: + // * Go(fyne.Layout) + "layout-grid-wrap-layout": { + Doc: "layout.NewGridWrapLayout", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Size + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Size); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("layout-grid-wrap-layout: arg 1: " + "expected native of type *fyne.Size, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("layout-grid-wrap-layout: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := layout.NewGridWrapLayout(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // layout-h-box-layout returns a horizontal box layout for stacking a number of child + // canvas objects or widgets left to right. The objects are always displayed + // at their horizontal MinSize. Use a different layout if the objects are intended + // to be larger than their horizontal MinSize. + // + // Result: + // * Go(fyne.Layout) + "layout-h-box-layout": { + Doc: "layout.NewHBoxLayout", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := layout.NewHBoxLayout() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // layout-max-layout creates a new MaxLayout instance + // + // Deprecated: Use layout.NewStackLayout() instead. + // + // Result: + // * Go(fyne.Layout) + "layout-max-layout": { + Doc: "layout.NewMaxLayout", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := layout.NewMaxLayout() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // layout-padded-layout creates a new PaddedLayout instance + // + // Since: 1.4 + // + // Result: + // * Go(fyne.Layout) + "layout-padded-layout": { + Doc: "layout.NewPaddedLayout", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := layout.NewPaddedLayout() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // layout-spacer returns a spacer object which can fill vertical and horizontal + // space. This is primarily used with a box layout. + // + // Result: + // * Go(fyne.CanvasObject) + "layout-spacer": { + Doc: "layout.NewSpacer", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := layout.NewSpacer() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.CanvasObject)") + return res0Obj + }, + }, + // layout-stack-layout returns a new StackLayout instance. Objects are stacked + // on top of each other with later objects on top of those before. + // Having only a single object has no impact as CanvasObjects will + // fill the available space even without a Stack. + // + // Since: 2.4 + // + // Result: + // * Go(fyne.Layout) + "layout-stack-layout": { + Doc: "layout.NewStackLayout", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := layout.NewStackLayout() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // layout-v-box-layout returns a vertical box layout for stacking a number of child + // canvas objects or widgets top to bottom. The objects are always displayed + // at their vertical MinSize. Use a different layout if the objects are intended + // to be larger than their vertical MinSize. + // + // Result: + // * Go(fyne.Layout) + "layout-v-box-layout": { + Doc: "layout.NewVBoxLayout", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := layout.NewVBoxLayout() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Layout)") + return res0Obj + }, + }, + // Result: + // * integer + "mobile-default-keyboard": { + Doc: "Get mobile.DefaultKeyboard value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int32(mobile.DefaultKeyboard))) + return resObj + }, + }, + // Result: + // * string + "mobile-key-back": { + Doc: "Get mobile.KeyBack value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(mobile.KeyBack)) + return resObj + }, + }, + "mobile-touch-event": { + Doc: "Create a new mobile.TouchEvent struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &mobile.TouchEvent{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*mobile.TouchEvent)") + return resObj + }, + }, + // Result: + // * integer + "mobile-number-keyboard": { + Doc: "Get mobile.NumberKeyboard value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int32(mobile.NumberKeyboard))) + return resObj + }, + }, + // Result: + // * integer + "mobile-password-keyboard": { + Doc: "Get mobile.PasswordKeyboard value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int32(mobile.PasswordKeyboard))) + return resObj + }, + }, + // Result: + // * integer + "mobile-single-line-keyboard": { + Doc: "Get mobile.SingleLineKeyboard value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int32(mobile.SingleLineKeyboard))) + return resObj + }, + }, + // playground-software-canvas creates a new canvas in memory that can render without hardware support + // + // Result: + // * Go(test.WindowlessCanvas) + "playground-software-canvas": { + Doc: "playground.NewSoftwareCanvas", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := playground.NewSoftwareCanvas() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(test.WindowlessCanvas)") + return res0Obj + }, + }, + // playground-render takes a canvasobject and converts it into an inline image for showing in the playground + // + // Args: + // * obj - Go(fyne.CanvasObject) + "playground-render": { + Doc: "playground.Render", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("playground-render: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("playground-render: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("playground-render: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("playground-render: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + playground.Render(arg0Val) + return nil + }, + }, + // playground-render-canvas takes a canvas and converts it into an inline image for showing in the playground + // + // Args: + // * c - Go(fyne.Canvas) + "playground-render-canvas": { + Doc: "playground.RenderCanvas", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("playground-render-canvas: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("playground-render-canvas: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("playground-render-canvas: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("playground-render-canvas: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + playground.RenderCanvas(arg0Val) + return nil + }, + }, + // playground-render-window takes a window and converts it's canvas into an inline image for showing in the playground + // + // Args: + // * w - Go(fyne.Window) + "playground-render-window": { + Doc: "playground.RenderWindow", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Window + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Window(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("playground-render-window: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Window); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("playground-render-window: arg 1: " + "expected native of type fyne.Window, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("playground-render-window: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("playground-render-window: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + playground.RenderWindow(arg0Val) + return nil + }, + }, + // repository-for-scheme returns the Repository instance which is registered to handle URIs + // of the given scheme. + // + // NOTE: this function is intended to be used specifically by the storage + // package. It generally should not be used outside of the fyne package - + // instead you should use the methods in the storage package. + // + // Since: 2.0 + // + // Args: + // * scheme - string + // Result: + // * Go(repository.Repository) + // * error + "repository-for-scheme": { + Doc: "repository.ForScheme", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("repository-for-scheme: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0, resErr := repository.ForScheme(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(repository.Repository)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // repository-for-uri returns the Repository instance which is registered to handle URIs of + // the given scheme. This is a helper method that calls ForScheme() on the + // scheme of the given URI. + // + // NOTE: this function is intended to be used specifically by the storage + // package. It generally should not be used outside of the fyne package - + // instead you should use the methods in the storage package. + // + // Since: 2.0 + // + // Args: + // * u - Go(fyne.URI) + // Result: + // * Go(repository.Repository) + // * error + "repository-for-uri": { + Doc: "repository.ForURI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("repository-for-uri: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("repository-for-uri: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("repository-for-uri: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("repository-for-uri: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := repository.ForURI(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(repository.Repository)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // repository-generic-child can be used as a common-case implementation of + // HierarchicalRepository.Child(). It will create a child URI by separating the + // URI into it's component parts as described in IETF RFC 3986, then appending + // "/" + component to the path, then concatenating the result and parsing it as + // a new URI. + // + // NOTE: this function should not be called except by an implementation of + // the Repository interface - using this for unknown URIs may break. + // + // Since: 2.0 + // + // Args: + // * u - Go(fyne.URI) + // * component - string + // Result: + // * Go(fyne.URI) + // * error + "repository-generic-child": { + Doc: "repository.GenericChild", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("repository-generic-child: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("repository-generic-child: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("repository-generic-child: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("repository-generic-child: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("repository-generic-child: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := repository.GenericChild(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // repository-generic-copy can be used a common-case implementation of + // CopyableRepository.Copy(). It will perform the copy by obtaining a reader + // for the source URI, a writer for the destination URI, then writing the + // contents of the source to the destination. + // + // For obvious reasons, the destination URI must have a registered + // WritableRepository. + // + // NOTE: this function should not be called except by an implementation of + // the Repository interface - using this for unknown URIs may break. + // + // Since: 2.0 + // + // Args: + // * source - Go(fyne.URI) + // * destination - Go(fyne.URI) + // Result: + // * error + "repository-generic-copy": { + Doc: "repository.GenericCopy", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("repository-generic-copy: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("repository-generic-copy: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("repository-generic-copy: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("repository-generic-copy: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("repository-generic-copy: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("repository-generic-copy: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("repository-generic-copy: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("repository-generic-copy: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := repository.GenericCopy(arg0Val, arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return nil + }, + }, + // repository-generic-move can be used a common-case implementation of + // MovableRepository.Move(). It will perform the move by obtaining a reader + // for the source URI, a writer for the destination URI, then writing the + // contents of the source to the destination. Following this, the source + // will be deleted using WritableRepository.Delete. + // + // For obvious reasons, the source and destination URIs must both be writable. + // + // NOTE: this function should not be called except by an implementation of + // the Repository interface - using this for unknown URIs may break. + // + // Since: 2.0 + // + // Args: + // * source - Go(fyne.URI) + // * destination - Go(fyne.URI) + // Result: + // * error + "repository-generic-move": { + Doc: "repository.GenericMove", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("repository-generic-move: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("repository-generic-move: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("repository-generic-move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("repository-generic-move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("repository-generic-move: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("repository-generic-move: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("repository-generic-move: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("repository-generic-move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := repository.GenericMove(arg0Val, arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return nil + }, + }, + // repository-generic-parent can be used as a common-case implementation of + // HierarchicalRepository.Parent(). It will create a parent URI based on + // IETF RFC3986. + // + // In short, the URI is separated into it's component parts, the path component + // is split along instances of '/', and the trailing element is removed. The + // result is concatenated and parsed as a new URI. + // + // If the URI path is empty or '/', then a nil URI is returned, along with + // ErrURIRoot. + // + // NOTE: this function should not be called except by an implementation of + // the Repository interface - using this for unknown URIs may break. + // + // Since: 2.0 + // + // Args: + // * u - Go(fyne.URI) + // Result: + // * Go(fyne.URI) + // * error + "repository-generic-parent": { + Doc: "repository.GenericParent", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("repository-generic-parent: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("repository-generic-parent: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("repository-generic-parent: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("repository-generic-parent: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := repository.GenericParent(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // repository-file-uri implements the back-end logic to storage.repository-file-uri, which you + // should use instead. This is only here because other functions in repository + // need to call it, and it prevents a circular import. + // + // Since: 2.0 + // + // Args: + // * path - string + // Result: + // * Go(fyne.URI) + "repository-file-uri": { + Doc: "repository.NewFileURI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("repository-file-uri: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := repository.NewFileURI(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + return res0Obj + }, + }, + // repository-parse-uri implements the back-end logic for storage.repository-parse-uri, which you + // should use instead. This is only here because other functions in repository + // need to call it, and it prevents a circular import. + // + // Since: 2.0 + // + // Args: + // * s - string + // Result: + // * Go(fyne.URI) + // * error + "repository-parse-uri": { + Doc: "repository.ParseURI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("repository-parse-uri: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0, resErr := repository.ParseURI(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // repository-register registers a storage repository so that operations on URIs of the + // registered scheme will use methods implemented by the relevant repository + // implementation. + // + // Since: 2.0 + // + // Args: + // * scheme - string + // * repository - Go(repository.Repository) + "repository-register": { + Doc: "repository.Register", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("repository-register: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val repository.Repository + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_repository_Repository(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("repository-register: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(repository.Repository); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("repository-register: arg 2: " + "expected native of type repository.Repository, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("repository-register: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("repository-register: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + repository.Register(arg0Val, arg1Val) + return nil + }, + }, + // software-canvas creates a new canvas in memory that can render without hardware support. + // + // Result: + // * Go(test.WindowlessCanvas) + "software-canvas": { + Doc: "software.NewCanvas", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := software.NewCanvas() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(test.WindowlessCanvas)") + return res0Obj + }, + }, + // software-transparent-canvas creates a new canvas in memory that can render without hardware support without a background color. + // + // Since: 2.2 + // + // Result: + // * Go(test.WindowlessCanvas) + "software-transparent-canvas": { + Doc: "software.NewTransparentCanvas", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := software.NewTransparentCanvas() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(test.WindowlessCanvas)") + return res0Obj + }, + }, + // software-render takes a canvas object and renders it to a regular Go image using the provided Theme. + // The returned image will be set to the object's minimum size. + // Use the theme.LightTheme() or theme.DarkTheme() to access the builtin themes. + // + // Args: + // * obj - Go(fyne.CanvasObject) + // * t - Go(fyne.Theme) + // Result: + // * Go(image.Image) + "software-render": { + Doc: "software.Render", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("software-render: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("software-render: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("software-render: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("software-render: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Theme + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Theme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("software-render: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Theme); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("software-render: arg 2: " + "expected native of type fyne.Theme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("software-render: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("software-render: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := software.Render(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(image.Image)") + return res0Obj + }, + }, + // software-render-canvas takes a canvas and renders it to a regular Go image using the provided Theme. + // This is the same as setting the application theme and then calling Canvas.Capture(). + // + // Args: + // * c - Go(fyne.Canvas) + // * t - Go(fyne.Theme) + // Result: + // * Go(image.Image) + "software-render-canvas": { + Doc: "software.RenderCanvas", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("software-render-canvas: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("software-render-canvas: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("software-render-canvas: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("software-render-canvas: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Theme + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Theme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("software-render-canvas: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Theme); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("software-render-canvas: arg 2: " + "expected native of type fyne.Theme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("software-render-canvas: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("software-render-canvas: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := software.RenderCanvas(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(image.Image)") + return res0Obj + }, + }, + // storage-can-list will determine if the URI is listable or not. + // + // This method may fail in several ways: + // + // - Different permissions or credentials are required to check if the + // URI supports listing. + // + // - This URI scheme could represent some resources that can be listed, + // but this specific URI is not one of them (e.g. a file on a + // filesystem, as opposed to a directory). + // + // - Checking for listability depended on a lower level operation + // such as network or filesystem access that has failed in some way. + // + // - If the scheme of the given URI does not have a registered + // ListableRepository instance, then this method will fail with a + // repository.ErrOperationNotSupported. + // + // storage-can-list is backed by the repository system - this function calls into a + // scheme-specific implementation from a registered repository. + // + // Since: 2.0 + // + // Args: + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "storage-can-list": { + Doc: "storage.CanList", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-can-list: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-can-list: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-can-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-can-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := storage.CanList(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // storage-can-read determines if a given URI could be written to using the Reader() + // method. It is preferred to check if a URI is readable using this method + // before calling Reader(), because the underlying operations required to + // attempt to read and then report an error may be slower than the operations + // needed to test if a URI is readable. Keep in mind however that even if + // storage-can-read returns true, you must still do appropriate error handling for + // Reader(), as the underlying filesystem may have changed since you called + // storage-can-read. + // + // The non-existence of a resource should not be treated as an error. In other + // words, a Repository implementation which for some URI u returns false, nil + // for Exists(u), storage-can-read(u) should also return false, nil. + // + // storage-can-read is backed by the repository system - this function calls into a + // scheme-specific implementation from a registered repository. + // + // Since: 2.0 + // + // Args: + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "storage-can-read": { + Doc: "storage.CanRead", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-can-read: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-can-read: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-can-read: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-can-read: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := storage.CanRead(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // storage-can-write is backed by the repository system - this function calls into a + // scheme-specific implementation from a registered repository. + // + // Since: 2.0 + // + // Args: + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "storage-can-write": { + Doc: "storage.CanWrite", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-can-write: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-can-write: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-can-write: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-can-write: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := storage.CanWrite(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // storage-child returns a URI referencing a resource nested hierarchically below the + // given URI, identified by a string. For example, the child with the string + // component 'quux' of 'file://foo/bar' is 'file://foo/bar/quux'. + // + // This can fail in several ways: + // + // - If the URI refers to a resource which does not exist in a hierarchical + // context (e.g. the URI references something which does not have a + // semantically meaningful "child"), the storage-child() implementation may return an + // error. + // + // - If generating a reference to a child of the referenced resource requires + // interfacing with some external system, failures may propagate through the + // storage-child() implementation. It is expected that this case would occur very + // rarely if ever. + // + // - If the scheme of the given URI does not have a registered + // HierarchicalRepository instance, then this method will fail with a + // repository.ErrOperationNotSupported. + // + // NOTE: since v2.0.0, storage-child() is backed by the repository system - this + // function is a helper which calls into an appropriate repository instance for + // the scheme of the URI it is given. + // + // Since: 1.4 + // + // Args: + // * u - Go(fyne.URI) + // * component - string + // Result: + // * Go(fyne.URI) + // * error + "storage-child": { + Doc: "storage.Child", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-child: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-child: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-child: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-child: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("storage-child: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0, resErr := storage.Child(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // storage-copy given two URIs, 'src', and 'dest' both of the same scheme, will copy + // one to the other. If the source and destination are of different schemes, + // then the storage-copy implementation for the storage repository registered to the + // scheme of the source will be used. Implementations are recommended to use + // repository.Genericstorage-copy() as a fail-over in the case that they do not + // understand how to operate on the scheme of the destination URI. However, the + // behavior of calling storage-copy() on URIs of non-matching schemes is ultimately + // defined by the storage repository registered to the scheme of the source + // URI. + // + // This method may fail in several ways: + // + // - Different permissions or credentials are required to perform the + // copy operation. + // + // - This URI scheme could represent some resources that can be copied, + // but either the source, destination, or both are not resources + // that support copying. + // + // - Performing the copy operation depended on a lower level operation + // such as network or filesystem access that has failed in some way. + // + // - If the scheme of the given URI does not have a registered + // storage-copyableRepository instance, then this method will fail with a + // repository.ErrOperationNotSupported. + // + // storage-copy is backed by the repository system - this function calls into a + // scheme-specific implementation from a registered repository. + // + // Since: 2.0 + // + // Args: + // * source - Go(fyne.URI) + // * destination - Go(fyne.URI) + // Result: + // * error + "storage-copy": { + Doc: "storage.Copy", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-copy: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-copy: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-copy: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-copy: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-copy: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-copy: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-copy: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-copy: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := storage.Copy(arg0Val, arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return nil + }, + }, + // storage-create-listable creates a new listable resource referenced by the given URI. + // storage-create-listable will error if the URI already references an extant resource. + // This method is used for storage repositories where listable resources are of + // a different underlying type than other resources - for example, in a typical + // filesystem ('file://'), storage-create-listable() corresponds to directory creation, + // and Writer() implies file creation for non-extant operands. + // + // For storage repositories where listable and non-listable resources are the + // of the same underlying type, storage-create-listable should be equivalent to calling + // Writer(), writing zero bytes, and then closing the `URIWriteCloser - in + // filesystem terms, the same as calling 'touch;'. + // + // Storage repositories which support listing, but not creation of listable + // objects may return repository.ErrOperationNotSupported. + // + // storage-create-listable should generally fail if the parent of it's operand does not + // exist, however this can vary by the implementation details of the specific + // storage repository. In filesystem terms, this function is "mkdir" not "mkdir + // -p". + // + // This method may fail in several ways: + // + // - Different permissions or credentials are required to create the requested + // resource. + // + // - Creating the resource depended on a lower level operation such as network + // or filesystem access that has failed in some way. + // + // - If the scheme of the given URI does not have a registered + // ListableRepository instance, then this method will fail with a + // repository.ErrOperationNotSupported. + // + // storage-create-listable is backed by the repository system - this function either + // calls into a scheme-specific implementation from a registered repository, or + // fails with a URIOperationNotSupported error. + // + // Since: 2.0 + // + // Args: + // * u - Go(fyne.URI) + // Result: + // * error + "storage-create-listable": { + Doc: "storage.CreateListable", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-create-listable: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-create-listable: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-create-listable: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-create-listable: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := storage.CreateListable(arg0Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return nil + }, + }, + // storage-delete destroys, deletes, or otherwise removes the resource referenced + // by the URI. + // + // This can fail in several ways: + // + // - If removing the resource requires interfacing with some external system, + // failures may propagate through Destroy(). For example, deleting a file may + // fail with a permissions error. + // + // - If the referenced resource does not exist, attempting to destroy it should + // throw an error. + // + // - If the scheme of the given URI does not have a registered + // WritableRepository instance, then this method will fail with a + // repository.ErrOperationNotSupported. + // + // storage-delete is backed by the repository system - this function calls + // into a scheme-specific implementation from a registered repository. + // + // Since: 2.0 + // + // Args: + // * u - Go(fyne.URI) + // Result: + // * error + "storage-delete": { + Doc: "storage.Delete", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-delete: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-delete: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-delete: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-delete: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := storage.Delete(arg0Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return nil + }, + }, + // storage-exists determines if the resource referenced by the URI exists. + // + // This can fail in several ways: + // + // - If checking the existence of a resource requires interfacing with some + // external system, then failures may propagate through storage-exists(). For + // example, checking the existence of a resource requires reading a directory + // may result in a permissions error. + // + // It is understood that a non-nil error value signals that the existence or + // non-existence of the resource cannot be determined and is undefined. + // + // NOTE: since v2.0.0, storage-exists is backed by the repository system - this function + // calls into a scheme-specific implementation from a registered repository. + // + // storage-exists may call into either a generic implementation, or into a + // scheme-specific implementation depending on which storage repositories have + // been registered. + // + // Since: 1.4 + // + // Args: + // * u - Go(fyne.URI) + // Result: + // * bool + // * error + "storage-exists": { + Doc: "storage.Exists", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-exists: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-exists: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-exists: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-exists: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := storage.Exists(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // storage-list returns a list of URIs that reference resources which are nested below + // the resource referenced by the argument. For example, listing a directory on + // a filesystem should return a list of files and directories it contains. + // + // This method may fail in several ways: + // + // - Different permissions or credentials are required to obtain a + // listing for the given URI. + // + // - This URI scheme could represent some resources that can be listed, + // but this specific URI is not one of them (e.g. a file on a + // filesystem, as opposed to a directory). This can be tested in advance + // using the storage-listable() function. + // + // - Obtaining the listing depended on a lower level operation such as + // network or filesystem access that has failed in some way. + // + // - If the scheme of the given URI does not have a registered + // storage-listableRepository instance, then this method will fail with a + // repository.ErrOperationNotSupported. + // + // storage-list is backed by the repository system - this function either calls into a + // scheme-specific implementation from a registered repository, or fails with a + // URIOperationNotSupported error. + // + // Since: 2.0 + // + // Args: + // * u - Go(fyne.URI) + // Result: + // * block[Go(fyne.URI)] + // * error + "storage-list": { + Doc: "storage.List", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-list: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-list: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-list: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := storage.List(arg0Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.URI)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // storage-lister-for-uri will attempt to use the application's driver to convert a + // standard URI into a listable URI. + // + // Since: 1.4 + // + // Args: + // * uri - Go(fyne.URI) + // Result: + // * Go(fyne.ListableURI) + // * error + "storage-lister-for-uri": { + Doc: "storage.ListerForURI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-lister-for-uri: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-lister-for-uri: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-lister-for-uri: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-lister-for-uri: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := storage.ListerForURI(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.ListableURI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // storage-load-resource-from-uri creates a new StaticResource in memory using the contents of the specified URI. + // The URI will be opened using the current driver, so valid schemas will vary from platform to platform. + // The file:// schema will always work. + // + // Args: + // * u - Go(fyne.URI) + // Result: + // * Go(fyne.Resource) + // * error + "storage-load-resource-from-uri": { + Doc: "storage.LoadResourceFromURI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-load-resource-from-uri: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-load-resource-from-uri: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-load-resource-from-uri: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-load-resource-from-uri: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := storage.LoadResourceFromURI(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // storage-move returns a method that given two URIs, 'src' and 'dest' both of the same + // scheme this will move src to dest. This means the resource referenced by + // src will be copied into the resource referenced by dest, and the resource + // referenced by src will no longer exist after the operation is complete. + // + // If the source and destination are of different schemes, then the storage-move + // implementation for the storage repository registered to the scheme of the + // source will be used. Implementations are recommended to use + // repository.Genericstorage-move() as a fail-over in the case that they do not + // understand how to operate on the scheme of the destination URI. However, the + // behavior of calling storage-move() on URIs of non-matching schemes is ultimately + // defined by the storage repository registered to the scheme of the source + // URI. + // + // This method may fail in several ways: + // + // - Different permissions or credentials are required to perform the + // rename operation. + // + // - This URI scheme could represent some resources that can be renamed, + // but either the source, destination, or both are not resources + // that support renaming. + // + // - Performing the rename operation depended on a lower level operation + // such as network or filesystem access that has failed in some way. + // + // - If the scheme of the given URI does not have a registered + // MovableRepository instance, then this method will fail with a + // repository.ErrOperationNotSupported. + // + // storage-move is backed by the repository system - this function calls into a + // scheme-specific implementation from a registered repository. + // + // Since: 2.0 + // + // Args: + // * source - Go(fyne.URI) + // * destination - Go(fyne.URI) + // Result: + // * error + "storage-move": { + Doc: "storage.Move", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-move: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-move: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-move: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-move: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.URI + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-move: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-move: arg 2: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-move: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-move: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + resErr := storage.Move(arg0Val, arg1Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return nil + }, + }, + // storage-extension-file-filter takes a string slice of extensions with a leading . and creates a filter for the file dialog. + // Example: .jpg, .mp3, .txt, .sh + // + // Args: + // * extensions - block[string] + // Result: + // * Go(storage.FileFilter) + "storage-extension-file-filter": { + Doc: "storage.NewExtensionFileFilter", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []string + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("storage-extension-file-filter: arg 1: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-extension-file-filter: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-extension-file-filter: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := storage.NewExtensionFileFilter(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(storage.FileFilter)") + return res0Obj + }, + }, + // storage-file-uri creates a new URI from the given file path. + // + // Args: + // * path - string + // Result: + // * Go(fyne.URI) + "storage-file-uri": { + Doc: "storage.NewFileURI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("storage-file-uri: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := storage.NewFileURI(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + return res0Obj + }, + }, + // storage-mime-type-file-filter takes a string slice of mimetypes, including globs, and creates a filter for the file dialog. + // Example: image/*, audio/mp3, text/plain, application/* + // + // Args: + // * mime-types - block[string] + // Result: + // * Go(storage.FileFilter) + "storage-mime-type-file-filter": { + Doc: "storage.NewMimeTypeFileFilter", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []string + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("storage-mime-type-file-filter: arg 1: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-mime-type-file-filter: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-mime-type-file-filter: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := storage.NewMimeTypeFileFilter(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(storage.FileFilter)") + return res0Obj + }, + }, + // storage-uri creates a new URI from the given string representation. This could be + // a URI from an external source or one saved from URI.String() + // + // Deprecated: use ParseURI instead + // + // Args: + // * s - string + // Result: + // * Go(fyne.URI) + "storage-uri": { + Doc: "storage.NewURI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("storage-uri: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := storage.NewURI(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + return res0Obj + }, + }, + // storage-open-file-from-uri loads a file read stream from a resource identifier. + // This is mostly provided so that file references can be saved using their URI and loaded again later. + // + // Deprecated: this has been replaced by storage.Reader(URI) + // + // Args: + // * uri - Go(fyne.URI) + // Result: + // * Go(fyne.URIReadCloser) + // * error + "storage-open-file-from-uri": { + Doc: "storage.OpenFileFromURI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-open-file-from-uri: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-open-file-from-uri: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-open-file-from-uri: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-open-file-from-uri: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := storage.OpenFileFromURI(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URIReadCloser)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // storage-parent returns a URI referencing the parent resource of the resource + // referenced by the URI. For example, the storage-parent() of 'file://foo/bar.baz' is + // 'file://foo'. The URI which is returned will be listable. + // + // NOTE: it is not a given that storage-parent() return a parent URI with the same + // Scheme(), though this will normally be the case. + // + // This can fail in several ways: + // + // - If the URI refers to a filesystem root, then the storage-parent() implementation + // must return (nil, URIRootError). + // + // - If the URI refers to a resource which does not exist in a hierarchical + // context (e.g. the URI references something which does not have a + // semantically meaningful "parent"), the storage-parent() implementation may return + // an error. + // + // - If determining the parent of the referenced resource requires + // interfacing with some external system, failures may propagate + // through the storage-parent() implementation. For example if determining + // the parent of a file:// URI requires reading information from + // the filesystem, it could fail with a permission error. + // + // - If the scheme of the given URI does not have a registered + // HierarchicalRepository instance, then this method will fail with a + // repository.ErrOperationNotSupported. + // + // NOTE: since v2.0.0, storage-parent() is backed by the repository system - this + // function is a helper which calls into an appropriate repository instance for + // the scheme of the URI it is given. + // + // Since: 1.4 + // + // Args: + // * u - Go(fyne.URI) + // Result: + // * Go(fyne.URI) + // * error + "storage-parent": { + Doc: "storage.Parent", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-parent: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-parent: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-parent: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-parent: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := storage.Parent(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // storage-parse-uri creates a new URI instance by parsing a URI string. + // + // Parse URI will parse up to the first ':' present in the URI string to + // extract the scheme, and then delegate further parsing to the registered + // repository for the given scheme. If no repository is registered for that + // scheme, the URI is parsed on a best-effort basis using net/url. + // + // As a special exception, URIs beginning with 'file:' are always parsed using + // NewFileURI(), which will correctly handle back-slashes appearing in the URI + // path component on Windows. + // + // Since: 2.0 + // + // Args: + // * s - string + // Result: + // * Go(fyne.URI) + // * error + "storage-parse-uri": { + Doc: "storage.ParseURI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("storage-parse-uri: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0, resErr := storage.ParseURI(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URI)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // storage-reader returns URIReadCloser set up to read from the resource that the + // URI references. + // + // This method can fail in several ways: + // + // - Different permissions or credentials are required to read the + // referenced resource. + // + // - This URI scheme could represent some resources that can be read, + // but this particular URI references a resources that is not + // something that can be read. + // + // - Attempting to set up the reader depended on a lower level + // operation such as a network or filesystem access that has failed + // in some way. + // + // storage-reader is backed by the repository system - this function calls + // into a scheme-specific implementation from a registered repository. + // + // Since: 2.0 + // + // Args: + // * u - Go(fyne.URI) + // Result: + // * Go(fyne.URIReadCloser) + // * error + "storage-reader": { + Doc: "storage.Reader", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-reader: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-reader: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-reader: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-reader: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := storage.Reader(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URIReadCloser)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // storage-save-file-to-uri loads a file write stream to a resource identifier. + // This is mostly provided so that file references can be saved using their URI and written to again later. + // + // Deprecated: this has been replaced by storage.Writer(URI) + // + // Args: + // * uri - Go(fyne.URI) + // Result: + // * Go(fyne.URIWriteCloser) + // * error + "storage-save-file-to-uri": { + Doc: "storage.SaveFileToURI", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-save-file-to-uri: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-save-file-to-uri: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-save-file-to-uri: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-save-file-to-uri: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := storage.SaveFileToURI(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URIWriteCloser)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // storage-writer returns URIWriteCloser set up to write to the resource that the + // URI references. + // + // Writing to a non-extant resource should create that resource if possible + // (and if not possible, this should be reflected in the return of CanWrite()). + // Writing to an extant resource should overwrite it in-place. At present, this + // API does not provide a mechanism for appending to an already-extant + // resource, except for reading it in and writing all the data back out. + // + // This method can fail in several ways: + // + // - Different permissions or credentials are required to write to the + // referenced resource. + // + // - This URI scheme could represent some resources that can be + // written, but this particular URI references a resources that is + // not something that can be written. + // + // - Attempting to set up the writer depended on a lower level + // operation such as a network or filesystem access that has failed + // in some way. + // + // - If the scheme of the given URI does not have a registered + // WritableRepository instance, then this method will fail with a + // repository.ErrOperationNotSupported. + // + // storage-writer is backed by the repository system - this function calls into a + // scheme-specific implementation from a registered repository. + // + // Since: 2.0 + // + // Args: + // * u - Go(fyne.URI) + // Result: + // * Go(fyne.URIWriteCloser) + // * error + "storage-writer": { + Doc: "storage.Writer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("storage-writer: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("storage-writer: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("storage-writer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("storage-writer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := storage.Writer(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.URIWriteCloser)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // test-apply-theme sets the given theme and waits for it to be applied to the current app. + // + // Args: + // * t - *Go(testing.T) + // * theme - Go(fyne.Theme) + "test-apply-theme": { + Doc: "test.ApplyTheme", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *testing.T + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*testing.T); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-apply-theme: arg 1: " + "expected native of type *testing.T, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-apply-theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-apply-theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Theme + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Theme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-apply-theme: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Theme); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-apply-theme: arg 2: " + "expected native of type fyne.Theme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-apply-theme: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-apply-theme: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + test.ApplyTheme(arg0Val, arg1Val) + return nil + }, + }, + // test-assert-all-color-names-defined asserts that all known color names are defined for the given theme. + // + // Args: + // * t - *Go(testing.T) + // * th - Go(fyne.Theme) + // * theme-name - string + "test-assert-all-color-names-defined": { + Doc: "test.AssertAllColorNamesDefined", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *testing.T + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*testing.T); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-all-color-names-defined: arg 1: " + "expected native of type *testing.T, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-all-color-names-defined: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-all-color-names-defined: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Theme + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Theme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-assert-all-color-names-defined: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Theme); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-all-color-names-defined: arg 2: " + "expected native of type fyne.Theme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-all-color-names-defined: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-all-color-names-defined: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val string + if vc, ok := arg2.(env.String); ok { + arg2Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("test-assert-all-color-names-defined: arg 3: " + "expected string, but got " + objectDebugString(ps.Idx, arg2)) + } + test.AssertAllColorNamesDefined(arg0Val, arg1Val, arg2Val) + return nil + }, + }, + // test-assert-canvas-tappable-at asserts that the canvas is tappable at the given position. + // + // Args: + // * t - *Go(testing.T) + // * c - Go(fyne.Canvas) + // * pos - Go(fyne.Position) + // Result: + // * bool + "test-assert-canvas-tappable-at": { + Doc: "test.AssertCanvasTappableAt", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *testing.T + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*testing.T); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-canvas-tappable-at: arg 1: " + "expected native of type *testing.T, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-canvas-tappable-at: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-canvas-tappable-at: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Canvas + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-assert-canvas-tappable-at: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-canvas-tappable-at: arg 2: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-canvas-tappable-at: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-canvas-tappable-at: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Position + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-canvas-tappable-at: arg 3: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("test-assert-canvas-tappable-at: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := test.AssertCanvasTappableAt(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // test-assert-image-matches asserts that the given image is the same as the one stored in the master file. + // The master filename is relative to the `testdata` directory which is relative to the test. + // The test `t` fails if the given image is not equal to the loaded master image. + // In this case the given image is written into a file in `testdata/failed/` (relative to the test). + // This path is also reported, thus the file can be used as new master. + // + // Args: + // * t - *Go(testing.T) + // * master-filename - string + // * img - Go(image.Image) + // * msg-and-args - block[Go(any)] + // Result: + // * bool + "test-assert-image-matches": { + Doc: "test.AssertImageMatches", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *testing.T + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*testing.T); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-image-matches: arg 1: " + "expected native of type *testing.T, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-image-matches: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-image-matches: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("test-assert-image-matches: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val image.Image + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(image.Image); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-image-matches: arg 3: " + "expected native of type image.Image, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("test-assert-image-matches: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg3Val []any + switch v := arg3.(type) { + case env.Block: + arg3Val = make([]any, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg3Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-image-matches: arg 4: " + "block item: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("test-assert-image-matches: arg 4: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-image-matches: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-image-matches: arg 4: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := test.AssertImageMatches(arg0Val, arg1Val, arg2Val, arg3Val...) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // test-assert-notification-sent allows an app developer to assert that a notification was sent. + // After the content of f has executed this utility will check that the specified notification was sent. + // + // Args: + // * t - *Go(testing.T) + // * n - Go(*fyne.Notification) + // * f - fn { } + "test-assert-notification-sent": { + Doc: "test.AssertNotificationSent", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *testing.T + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*testing.T); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-notification-sent: arg 1: " + "expected native of type *testing.T, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-notification-sent: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-notification-sent: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val *fyne.Notification + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Notification); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-notification-sent: arg 2: " + "expected native of type *fyne.Notification, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-notification-sent: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-notification-sent: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val func() + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-notification-sent: arg 3: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-notification-sent: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-notification-sent: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + test.AssertNotificationSent(arg0Val, arg1Val, arg2Val) + return nil + }, + }, + // test-assert-object-renders-to-image asserts that the given `CanvasObject` renders the same image as the one stored in the master file. + // The theme used is the standard test theme which may look different to how it shows on your device. + // The master filename is relative to the `testdata` directory which is relative to the test. + // The test `t` fails if the given image is not equal to the loaded master image. + // In this case the given image is written into a file in `testdata/failed/` (relative to the test). + // This path is also reported, thus the file can be used as new master. + // + // Since 2.3 + // + // Args: + // * t - *Go(testing.T) + // * master-filename - string + // * o - Go(fyne.CanvasObject) + // * msg-and-args - block[Go(any)] + // Result: + // * bool + "test-assert-object-renders-to-image": { + Doc: "test.AssertObjectRendersToImage", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *testing.T + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*testing.T); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-image: arg 1: " + "expected native of type *testing.T, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-image: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-image: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-image: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.CanvasObject + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-image: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-image: arg 3: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-image: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-image: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg3Val []any + switch v := arg3.(type) { + case env.Block: + arg3Val = make([]any, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg3Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-image: arg 4: " + "block item: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-image: arg 4: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-image: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-image: arg 4: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := test.AssertObjectRendersToImage(arg0Val, arg1Val, arg2Val, arg3Val...) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // test-assert-object-renders-to-markup asserts that the given `CanvasObject` renders the same markup as the one stored in the master file. + // The master filename is relative to the `testdata` directory which is relative to the test. + // The test `t` fails if the rendered markup is not equal to the loaded master markup. + // In this case the rendered markup is written into a file in `testdata/failed/` (relative to the test). + // This path is also reported, thus the file can be used as new master. + // + // Be aware, that the indentation has to use tab characters ('\t') instead of spaces. + // Every element starts on a new line indented one more than its parent. + // Closing elements stand on their own line, too, using the same indentation as the opening element. + // The only exception to this are text elements which do not contain line breaks unless the text includes them. + // + // Since 2.3 + // + // Args: + // * t - *Go(testing.T) + // * master-filename - string + // * o - Go(fyne.CanvasObject) + // * msg-and-args - block[Go(any)] + // Result: + // * bool + "test-assert-object-renders-to-markup": { + Doc: "test.AssertObjectRendersToMarkup", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *testing.T + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*testing.T); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-markup: arg 1: " + "expected native of type *testing.T, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-markup: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-markup: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-markup: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.CanvasObject + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-markup: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-markup: arg 3: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-markup: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-markup: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg3Val []any + switch v := arg3.(type) { + case env.Block: + arg3Val = make([]any, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg3Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-markup: arg 4: " + "block item: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-markup: arg 4: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-markup: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-object-renders-to-markup: arg 4: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := test.AssertObjectRendersToMarkup(arg0Val, arg1Val, arg2Val, arg3Val...) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // test-assert-renders-to-image asserts that the given canvas renders the same image as the one stored in the master file. + // The master filename is relative to the `testdata` directory which is relative to the test. + // The test `t` fails if the given image is not equal to the loaded master image. + // In this case the given image is written into a file in `testdata/failed/` (relative to the test). + // This path is also reported, thus the file can be used as new master. + // + // Since 2.3 + // + // Args: + // * t - *Go(testing.T) + // * master-filename - string + // * c - Go(fyne.Canvas) + // * msg-and-args - block[Go(any)] + // Result: + // * bool + "test-assert-renders-to-image": { + Doc: "test.AssertRendersToImage", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *testing.T + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*testing.T); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-image: arg 1: " + "expected native of type *testing.T, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-image: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-image: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-image: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.Canvas + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-image: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-image: arg 3: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-image: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-image: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg3Val []any + switch v := arg3.(type) { + case env.Block: + arg3Val = make([]any, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg3Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-image: arg 4: " + "block item: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-image: arg 4: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-image: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-image: arg 4: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := test.AssertRendersToImage(arg0Val, arg1Val, arg2Val, arg3Val...) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // test-assert-renders-to-markup asserts that the given canvas renders the same markup as the one stored in the master file. + // The master filename is relative to the `testdata` directory which is relative to the test. + // The test `t` fails if the rendered markup is not equal to the loaded master markup. + // In this case the rendered markup is written into a file in `testdata/failed/` (relative to the test). + // This path is also reported, thus the file can be used as new master. + // + // Be aware, that the indentation has to use tab characters ('\t') instead of spaces. + // Every element starts on a new line indented one more than its parent. + // Closing elements stand on their own line, too, using the same indentation as the opening element. + // The only exception to this are text elements which do not contain line breaks unless the text includes them. + // + // Since: 2.0 + // + // Args: + // * t - *Go(testing.T) + // * master-filename - string + // * c - Go(fyne.Canvas) + // * msg-and-args - block[Go(any)] + // Result: + // * bool + "test-assert-renders-to-markup": { + Doc: "test.AssertRendersToMarkup", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *testing.T + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*testing.T); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-markup: arg 1: " + "expected native of type *testing.T, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-markup: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-markup: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-markup: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.Canvas + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-markup: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-markup: arg 3: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-markup: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-markup: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg3Val []any + switch v := arg3.(type) { + case env.Block: + arg3Val = make([]any, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg3Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(any); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-markup: arg 4: " + "block item: " + "expected native of type any, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-markup: arg 4: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-markup: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-assert-renders-to-markup: arg 4: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := test.AssertRendersToMarkup(arg0Val, arg1Val, arg2Val, arg3Val...) + var res0Obj env.Object + res0Obj = *env.NewInteger(boolToInt64(res0)) + return res0Obj + }, + }, + // test-canvas returns a reusable in-memory canvas used for testing + // + // Result: + // * Go(fyne.test-canvas) + "test-canvas": { + Doc: "test.Canvas", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := test.Canvas() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Canvas)") + return res0Obj + }, + }, + // test-double-tap simulates a double left mouse click on the specified object. + // + // Args: + // * obj - Go(fyne.test-double-tappable) + "test-double-tap": { + Doc: "test.DoubleTap", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.DoubleTappable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_DoubleTappable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-double-tap: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.DoubleTappable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-double-tap: arg 1: " + "expected native of type fyne.DoubleTappable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-double-tap: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-double-tap: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + test.DoubleTap(arg0Val) + return nil + }, + }, + // test-drag drags at an absolute position on the canvas. + // deltaX/Y is the dragging distance: <0 for dragging up/left, >0 for dragging down/right. + // + // Args: + // * c - Go(fyne.Canvas) + // * pos - Go(fyne.Position) + // * delta-x - decimal + // * delta-y - decimal + "test-drag": { + Doc: "test.Drag", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-drag: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-drag: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-drag: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-drag: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("test-drag: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("test-drag: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val float32 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("test-drag: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val float32 + if vc, ok := arg3.(env.Decimal); ok { + arg3Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("test-drag: arg 4: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg3)) + } + test.Drag(arg0Val, arg1Val, arg2Val, arg3Val) + return nil + }, + }, + // test-focus-next focuses the next focusable on the canvas. + // + // Args: + // * c - Go(fyne.Canvas) + "test-focus-next": { + Doc: "test.FocusNext", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-focus-next: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-focus-next: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-focus-next: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-focus-next: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + test.FocusNext(arg0Val) + return nil + }, + }, + // test-focus-previous focuses the previous focusable on the canvas. + // + // Args: + // * c - Go(fyne.Canvas) + "test-focus-previous": { + Doc: "test.FocusPrevious", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-focus-previous: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-focus-previous: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-focus-previous: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-focus-previous: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + test.FocusPrevious(arg0Val) + return nil + }, + }, + // test-known-theme-variants returns the known theme variants mapped by a descriptive key. + // + // Result: + // * dict[string, integer] + "test-known-theme-variants": { + Doc: "test.KnownThemeVariants", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := test.KnownThemeVariants() + var res0Obj env.Object + { + data := make(map[string]any, len(res0)) + for mKey, mVal := range res0 { + var dVal env.Object + dVal = *env.NewInteger(int64(uint(mVal))) + data[mKey] = dVal + } + res0Obj = *env.NewDict(data) + } + return res0Obj + }, + }, + // test-laid-out-objects returns all fyne.CanvasObject starting at the given fyne.CanvasObject which is laid out previously. + // + // Args: + // * o - Go(fyne.CanvasObject) + // Result: + // * block[Go(fyne.CanvasObject)] + "test-laid-out-objects": { + Doc: "test.LaidOutObjects", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-laid-out-objects: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-laid-out-objects: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-laid-out-objects: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-laid-out-objects: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := test.LaidOutObjects(arg0Val) + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = ifaceToNative(ps.Idx, it, "Go(fyne.CanvasObject)") + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // test-move-mouse simulates a mouse movement to the given position. + // + // Args: + // * c - Go(fyne.Canvas) + // * pos - Go(fyne.Position) + "test-move-mouse": { + Doc: "test.MoveMouse", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-move-mouse: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-move-mouse: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-move-mouse: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-move-mouse: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("test-move-mouse: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("test-move-mouse: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + test.MoveMouse(arg0Val, arg1Val) + return nil + }, + }, + // test-app returns a new dummy app used for testing. + // It loads a test driver which creates a virtual window in memory for testing. + // + // Result: + // * Go(fyne.App) + "test-app": { + Doc: "test.NewApp", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := test.NewApp() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.App)") + return res0Obj + }, + }, + // test-canvas-1 returns a single use in-memory canvas used for testing. + // This canvas has no painter so calls to Capture() will return a blank image. + // + // Result: + // * Go(test.WindowlessCanvas) + "test-canvas-1": { + Doc: "test.NewCanvas", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := test.NewCanvas() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(test.WindowlessCanvas)") + return res0Obj + }, + }, + // test-canvas-with-painter allows creation of an in-memory canvas with a specific painter. + // The painter will be used to render in the Capture() call. + // + // Args: + // * painter - Go(test.SoftwarePainter) + // Result: + // * Go(test.WindowlessCanvas) + "test-canvas-with-painter": { + Doc: "test.NewCanvasWithPainter", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.SoftwarePainter + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_SoftwarePainter(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-canvas-with-painter: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.SoftwarePainter); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-canvas-with-painter: arg 1: " + "expected native of type test.SoftwarePainter, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-canvas-with-painter: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-canvas-with-painter: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := test.NewCanvasWithPainter(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(test.WindowlessCanvas)") + return res0Obj + }, + }, + // test-clipboard returns a single use in-memory clipboard used for testing + // + // Result: + // * Go(fyne.Clipboard) + "test-clipboard": { + Doc: "test.NewClipboard", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := test.NewClipboard() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Clipboard)") + return res0Obj + }, + }, + // test-driver sets up and registers a new dummy driver for test purpose + // + // Result: + // * Go(fyne.Driver) + "test-driver": { + Doc: "test.NewDriver", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := test.NewDriver() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Driver)") + return res0Obj + }, + }, + // test-driver-with-painter creates a new dummy driver that will pass the given + // painter to all canvases created + // + // Args: + // * painter - Go(test.SoftwarePainter) + // Result: + // * Go(fyne.Driver) + "test-driver-with-painter": { + Doc: "test.NewDriverWithPainter", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.SoftwarePainter + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_SoftwarePainter(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-driver-with-painter: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.SoftwarePainter); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-driver-with-painter: arg 1: " + "expected native of type test.SoftwarePainter, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-driver-with-painter: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-driver-with-painter: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := test.NewDriverWithPainter(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Driver)") + return res0Obj + }, + }, + // test-temp-app returns a new dummy app and tears it down at the end of the test. + // + // Since: 2.5 + // + // Args: + // * t - Go(testing.TB) + // Result: + // * Go(fyne.App) + "test-temp-app": { + Doc: "test.NewTempApp", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val testing.TB + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(testing.TB); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-temp-app: arg 1: " + "expected native of type testing.TB, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("test-temp-app: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := test.NewTempApp(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.App)") + return res0Obj + }, + }, + // test-temp-window creates and registers a new window for test purposes. + // This window will get removed automatically once the running test ends. + // + // Since: 2.5 + // + // Args: + // * t - Go(testing.TB) + // * content - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.Window) + "test-temp-window": { + Doc: "test.NewTempWindow", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val testing.TB + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(testing.TB); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-temp-window: arg 1: " + "expected native of type testing.TB, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("test-temp-window: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-temp-window: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-temp-window: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-temp-window: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-temp-window: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := test.NewTempWindow(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Window)") + return res0Obj + }, + }, + // test-theme returns a new test theme using quiet ugly colors. + // + // Result: + // * Go(fyne.Theme) + "test-theme": { + Doc: "test.NewTheme", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := test.NewTheme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // test-transparent-canvas-with-painter allows creation of an in-memory canvas with a specific painter without a background color. + // The painter will be used to render in the Capture() call. + // + // Since: 2.2 + // + // Args: + // * painter - Go(test.SoftwarePainter) + // Result: + // * Go(test.WindowlessCanvas) + "test-transparent-canvas-with-painter": { + Doc: "test.NewTransparentCanvasWithPainter", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val test.SoftwarePainter + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_test_SoftwarePainter(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-transparent-canvas-with-painter: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(test.SoftwarePainter); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-transparent-canvas-with-painter: arg 1: " + "expected native of type test.SoftwarePainter, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-transparent-canvas-with-painter: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-transparent-canvas-with-painter: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := test.NewTransparentCanvasWithPainter(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(test.WindowlessCanvas)") + return res0Obj + }, + }, + // test-window creates and registers a new window for test purposes + // + // Args: + // * content - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.Window) + "test-window": { + Doc: "test.NewWindow", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-window: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-window: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-window: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-window: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := test.NewWindow(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Window)") + return res0Obj + }, + }, + // test-scroll scrolls at an absolute position on the canvas. + // deltaX/Y is the scrolling distance: <0 for scrolling up/left, >0 for scrolling down/right. + // + // Args: + // * c - Go(fyne.Canvas) + // * pos - Go(fyne.Position) + // * delta-x - decimal + // * delta-y - decimal + "test-scroll": { + Doc: "test.Scroll", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-scroll: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-scroll: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-scroll: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-scroll: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("test-scroll: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("test-scroll: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val float32 + if vc, ok := arg2.(env.Decimal); ok { + arg2Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("test-scroll: arg 3: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg2)) + } + var arg3Val float32 + if vc, ok := arg3.(env.Decimal); ok { + arg3Val = float32(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("test-scroll: arg 4: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg3)) + } + test.Scroll(arg0Val, arg1Val, arg2Val, arg3Val) + return nil + }, + }, + // test-tap simulates a left mouse click on the specified object. + // + // Args: + // * obj - Go(fyne.test-tappable) + "test-tap": { + Doc: "test.Tap", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Tappable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Tappable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-tap: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Tappable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-tap: arg 1: " + "expected native of type fyne.Tappable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-tap: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-tap: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + test.Tap(arg0Val) + return nil + }, + }, + // test-tap-at simulates a left mouse click on the passed object at a specified place within it. + // + // Args: + // * obj - Go(fyne.Tappable) + // * pos - Go(fyne.Position) + "test-tap-at": { + Doc: "test.TapAt", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Tappable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Tappable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-tap-at: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Tappable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-tap-at: arg 1: " + "expected native of type fyne.Tappable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-tap-at: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-tap-at: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("test-tap-at: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("test-tap-at: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + test.TapAt(arg0Val, arg1Val) + return nil + }, + }, + // test-tap-canvas taps at an absolute position on the canvas. + // + // Args: + // * c - Go(fyne.Canvas) + // * pos - Go(fyne.Position) + "test-tap-canvas": { + Doc: "test.TapCanvas", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-tap-canvas: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-tap-canvas: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-tap-canvas: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-tap-canvas: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("test-tap-canvas: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("test-tap-canvas: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + test.TapCanvas(arg0Val, arg1Val) + return nil + }, + }, + // test-tap-secondary simulates a right mouse click on the specified object. + // + // Args: + // * obj - Go(fyne.SecondaryTappable) + "test-tap-secondary": { + Doc: "test.TapSecondary", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.SecondaryTappable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_SecondaryTappable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-tap-secondary: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.SecondaryTappable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-tap-secondary: arg 1: " + "expected native of type fyne.SecondaryTappable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-tap-secondary: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-tap-secondary: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + test.TapSecondary(arg0Val) + return nil + }, + }, + // test-tap-secondary-at simulates a right mouse click on the passed object at a specified place within it. + // + // Args: + // * obj - Go(fyne.SecondaryTappable) + // * pos - Go(fyne.Position) + "test-tap-secondary-at": { + Doc: "test.TapSecondaryAt", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.SecondaryTappable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_SecondaryTappable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-tap-secondary-at: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.SecondaryTappable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-tap-secondary-at: arg 1: " + "expected native of type fyne.SecondaryTappable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-tap-secondary-at: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-tap-secondary-at: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Position + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg1Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("test-tap-secondary-at: arg 2: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("test-tap-secondary-at: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + test.TapSecondaryAt(arg0Val, arg1Val) + return nil + }, + }, + // test-temp-widget-renderer allows test scripts to gain access to the current renderer for a widget. + // This can be used for verifying correctness of rendered components for a widget in unit tests. + // The widget renderer is automatically destroyed when the test ends. + // + // Since: 2.5 + // + // Args: + // * t - *Go(testing.T) + // * wid - Go(fyne.Widget) + // Result: + // * Go(fyne.WidgetRenderer) + "test-temp-widget-renderer": { + Doc: "test.TempWidgetRenderer", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *testing.T + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*testing.T); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-temp-widget-renderer: arg 1: " + "expected native of type *testing.T, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-temp-widget-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-temp-widget-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-temp-widget-renderer: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-temp-widget-renderer: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-temp-widget-renderer: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-temp-widget-renderer: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := test.TempWidgetRenderer(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // test-theme-1 returns a test theme useful for image based tests. + // + // Result: + // * Go(fyne.test-theme-1) + "test-theme-1": { + Doc: "test.Theme", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := test.Theme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // test-type performs a series of key events to simulate typing of a value into the specified object. + // The focusable object will be focused before typing begins. + // The chars parameter will be input one rune at a time to the focused object. + // + // Args: + // * obj - Go(fyne.Focusable) + // * chars - string + "test-type": { + Doc: "test.Type", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Focusable + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Focusable(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-type: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Focusable); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-type: arg 1: " + "expected native of type fyne.Focusable, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-type: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-type: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("test-type: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + test.Type(arg0Val, arg1Val) + return nil + }, + }, + // test-type-on-canvas is like the Type function but it passes the key events to the canvas object + // rather than a focusable widget. + // + // Args: + // * c - Go(fyne.Canvas) + // * chars - string + "test-type-on-canvas": { + Doc: "test.TypeOnCanvas", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Canvas + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-type-on-canvas: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-type-on-canvas: arg 1: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-type-on-canvas: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-type-on-canvas: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("test-type-on-canvas: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + test.TypeOnCanvas(arg0Val, arg1Val) + return nil + }, + }, + // test-widget-renderer allows test scripts to gain access to the current renderer for a widget. + // This can be used for verifying correctness of rendered components for a widget in unit tests. + // + // Args: + // * wid - Go(fyne.Widget) + // Result: + // * Go(fyne.test-widget-renderer) + "test-widget-renderer": { + Doc: "test.WidgetRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Widget + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("test-widget-renderer: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-widget-renderer: arg 1: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-widget-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-widget-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := test.WidgetRenderer(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // test-with-test-theme runs a function with the testTheme temporarily set. + // + // Args: + // * t - *Go(testing.T) + // * f - fn { } + "test-with-test-theme": { + Doc: "test.WithTestTheme", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *testing.T + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*testing.T); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("test-with-test-theme: arg 1: " + "expected native of type *testing.T, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-with-test-theme: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-with-test-theme: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("test-with-test-theme: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("test-with-test-theme: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("test-with-test-theme: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + test.WithTestTheme(arg0Val, arg1Val) + return nil + }, + }, + // account-icon returns a resource containing the standard account icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "account-icon": { + Doc: "theme.AccountIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.AccountIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // background-color returns the theme's background color. + // + // Deprecated: Use Color(theme.ColorNameBackground) instead. + // + // Result: + // * Go(color.Color) + "background-color": { + Doc: "theme.BackgroundColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.BackgroundColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // broken-image-icon returns a resource containing an icon to specify a broken or missing image + // + // Since: 2.4 + // + // Result: + // * Go(fyne.Resource) + "broken-image-icon": { + Doc: "theme.BrokenImageIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.BrokenImageIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // button-color returns the theme's standard button color. + // + // Deprecated: Use Color(theme.ColorNameButton) instead. + // + // Result: + // * Go(color.Color) + "button-color": { + Doc: "theme.ButtonColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ButtonColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // cancel-icon returns a resource containing the standard cancel icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "cancel-icon": { + Doc: "theme.CancelIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.CancelIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // caption-text-size returns the size for caption text. + // + // Result: + // * decimal + "caption-text-size": { + Doc: "theme.CaptionTextSize", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.CaptionTextSize() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // check-button-checked-icon returns a resource containing the standard checkbox checked icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "check-button-checked-icon": { + Doc: "theme.CheckButtonCheckedIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.CheckButtonCheckedIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // check-button-fill-icon returns a resource containing the filled checkbox icon for the current theme. + // + // Since: 2.5 + // + // Result: + // * Go(fyne.Resource) + "check-button-fill-icon": { + Doc: "theme.CheckButtonFillIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.CheckButtonFillIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // check-button-icon returns a resource containing the standard checkbox icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "check-button-icon": { + Doc: "theme.CheckButtonIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.CheckButtonIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // color looks up the named colour for current theme and variant. + // + // Since: 2.5 + // + // Args: + // * name - string + // Result: + // * Go(color.color) + "color": { + Doc: "theme.Color", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ThemeColorName + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal fyne.ThemeColorName + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeColorName) + } + if natValOk { + arg0Val = natVal + } else { + var u string + if vc, ok := arg0.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("color: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = fyne.ThemeColorName(u) + } + } + res0 := theme.Color(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // color-achromatic-icon returns a resource containing the standard achromatic color icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "color-achromatic-icon": { + Doc: "theme.ColorAchromaticIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ColorAchromaticIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // color-chromatic-icon returns a resource containing the standard chromatic color icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "color-chromatic-icon": { + Doc: "theme.ColorChromaticIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ColorChromaticIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // color-for-widget looks up the named colour for the requested widget using the current theme and variant. + // If the widget theme has been overridden that theme will be used. + // + // Since: 2.5 + // + // Args: + // * name - string + // * w - Go(fyne.Widget) + // Result: + // * Go(color.Color) + "color-for-widget": { + Doc: "theme.ColorForWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ThemeColorName + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal fyne.ThemeColorName + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeColorName) + } + if natValOk { + arg0Val = natVal + } else { + var u string + if vc, ok := arg0.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("color-for-widget: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = fyne.ThemeColorName(u) + } + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("color-for-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("color-for-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("color-for-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("color-for-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := theme.ColorForWidget(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // Result: + // * string + "color-name-background": { + Doc: "Get theme.ColorNameBackground value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameBackground)) + return resObj + }, + }, + // Result: + // * string + "color-name-button": { + Doc: "Get theme.ColorNameButton value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameButton)) + return resObj + }, + }, + // Result: + // * string + "color-name-disabled": { + Doc: "Get theme.ColorNameDisabled value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameDisabled)) + return resObj + }, + }, + // Result: + // * string + "color-name-disabled-button": { + Doc: "Get theme.ColorNameDisabledButton value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameDisabledButton)) + return resObj + }, + }, + // Result: + // * string + "color-name-error": { + Doc: "Get theme.ColorNameError value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameError)) + return resObj + }, + }, + // Result: + // * string + "color-name-focus": { + Doc: "Get theme.ColorNameFocus value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameFocus)) + return resObj + }, + }, + // Result: + // * string + "color-name-foreground": { + Doc: "Get theme.ColorNameForeground value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameForeground)) + return resObj + }, + }, + // Result: + // * string + "color-name-foreground-on-error": { + Doc: "Get theme.ColorNameForegroundOnError value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameForegroundOnError)) + return resObj + }, + }, + // Result: + // * string + "color-name-foreground-on-primary": { + Doc: "Get theme.ColorNameForegroundOnPrimary value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameForegroundOnPrimary)) + return resObj + }, + }, + // Result: + // * string + "color-name-foreground-on-success": { + Doc: "Get theme.ColorNameForegroundOnSuccess value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameForegroundOnSuccess)) + return resObj + }, + }, + // Result: + // * string + "color-name-foreground-on-warning": { + Doc: "Get theme.ColorNameForegroundOnWarning value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameForegroundOnWarning)) + return resObj + }, + }, + // Result: + // * string + "color-name-header-background": { + Doc: "Get theme.ColorNameHeaderBackground value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameHeaderBackground)) + return resObj + }, + }, + // Result: + // * string + "color-name-hover": { + Doc: "Get theme.ColorNameHover value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameHover)) + return resObj + }, + }, + // Result: + // * string + "color-name-hyperlink": { + Doc: "Get theme.ColorNameHyperlink value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameHyperlink)) + return resObj + }, + }, + // Result: + // * string + "color-name-input-background": { + Doc: "Get theme.ColorNameInputBackground value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameInputBackground)) + return resObj + }, + }, + // Result: + // * string + "color-name-input-border": { + Doc: "Get theme.ColorNameInputBorder value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameInputBorder)) + return resObj + }, + }, + // Result: + // * string + "color-name-menu-background": { + Doc: "Get theme.ColorNameMenuBackground value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameMenuBackground)) + return resObj + }, + }, + // Result: + // * string + "color-name-overlay-background": { + Doc: "Get theme.ColorNameOverlayBackground value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameOverlayBackground)) + return resObj + }, + }, + // Result: + // * string + "color-name-place-holder": { + Doc: "Get theme.ColorNamePlaceHolder value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNamePlaceHolder)) + return resObj + }, + }, + // Result: + // * string + "color-name-pressed": { + Doc: "Get theme.ColorNamePressed value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNamePressed)) + return resObj + }, + }, + // Result: + // * string + "color-name-primary": { + Doc: "Get theme.ColorNamePrimary value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNamePrimary)) + return resObj + }, + }, + // Result: + // * string + "color-name-scroll-bar": { + Doc: "Get theme.ColorNameScrollBar value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameScrollBar)) + return resObj + }, + }, + // Result: + // * string + "color-name-selection": { + Doc: "Get theme.ColorNameSelection value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameSelection)) + return resObj + }, + }, + // Result: + // * string + "color-name-separator": { + Doc: "Get theme.ColorNameSeparator value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameSeparator)) + return resObj + }, + }, + // Result: + // * string + "color-name-shadow": { + Doc: "Get theme.ColorNameShadow value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameShadow)) + return resObj + }, + }, + // Result: + // * string + "color-name-success": { + Doc: "Get theme.ColorNameSuccess value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameSuccess)) + return resObj + }, + }, + // Result: + // * string + "color-name-warning": { + Doc: "Get theme.ColorNameWarning value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.ColorNameWarning)) + return resObj + }, + }, + // color-palette-icon returns a resource containing the standard color palette icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "color-palette-icon": { + Doc: "theme.ColorPaletteIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ColorPaletteIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // computer-icon returns a resource containing the standard computer icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "computer-icon": { + Doc: "theme.ComputerIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ComputerIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // confirm-icon returns a resource containing the standard confirm icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "confirm-icon": { + Doc: "theme.ConfirmIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ConfirmIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // content-add-icon returns a resource containing the standard content add icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "content-add-icon": { + Doc: "theme.ContentAddIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ContentAddIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // content-clear-icon returns a resource containing the standard content clear icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "content-clear-icon": { + Doc: "theme.ContentClearIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ContentClearIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // content-copy-icon returns a resource containing the standard content copy icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "content-copy-icon": { + Doc: "theme.ContentCopyIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ContentCopyIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // content-cut-icon returns a resource containing the standard content cut icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "content-cut-icon": { + Doc: "theme.ContentCutIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ContentCutIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // content-paste-icon returns a resource containing the standard content paste icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "content-paste-icon": { + Doc: "theme.ContentPasteIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ContentPasteIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // content-redo-icon returns a resource containing the standard content redo icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "content-redo-icon": { + Doc: "theme.ContentRedoIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ContentRedoIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // content-remove-icon returns a resource containing the standard content remove icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "content-remove-icon": { + Doc: "theme.ContentRemoveIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ContentRemoveIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // content-undo-icon returns a resource containing the standard content undo icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "content-undo-icon": { + Doc: "theme.ContentUndoIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ContentUndoIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // current returns the theme that is currently used for the running application. + // It looks up based on user preferences and application configuration. + // + // Since: 2.5 + // + // Result: + // * Go(fyne.Theme) + "current": { + Doc: "theme.Current", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.Current() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // current-for-widget returns the theme that is currently used for the specified widget. + // It looks for widget overrides and falls back to the application's current theme. + // + // Since: 2.5 + // + // Args: + // * w - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.Theme) + "current-for-widget": { + Doc: "theme.CurrentForWidget", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("current-for-widget: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("current-for-widget: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("current-for-widget: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("current-for-widget: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := theme.CurrentForWidget(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // dark-theme defines the built-in dark theme colors and sizes. + // + // Deprecated: This method ignores user preference and should not be used, it will be removed in v3.0. + // If developers want to ignore user preference for theme variant they can set a custom theme. + // + // Result: + // * Go(fyne.Theme) + "dark-theme": { + Doc: "theme.DarkTheme", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DarkTheme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // default-emoji-font returns the font resource for the built-in emoji font. + // This may return nil if the application was packaged without an emoji font. + // + // Since: 2.4 + // + // Result: + // * Go(fyne.Resource) + "default-emoji-font": { + Doc: "theme.DefaultEmojiFont", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DefaultEmojiFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // default-symbol-font returns the font resource for the built-in symbol font. + // + // Since: 2.2 + // + // Result: + // * Go(fyne.Resource) + "default-symbol-font": { + Doc: "theme.DefaultSymbolFont", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DefaultSymbolFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // default-text-bold-font returns the font resource for the built-in bold font style. + // + // Result: + // * Go(fyne.Resource) + "default-text-bold-font": { + Doc: "theme.DefaultTextBoldFont", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DefaultTextBoldFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // default-text-bold-italic-font returns the font resource for the built-in bold and italic font style. + // + // Result: + // * Go(fyne.Resource) + "default-text-bold-italic-font": { + Doc: "theme.DefaultTextBoldItalicFont", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DefaultTextBoldItalicFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // default-text-font returns the font resource for the built-in regular font style. + // + // Result: + // * Go(fyne.Resource) + "default-text-font": { + Doc: "theme.DefaultTextFont", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DefaultTextFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // default-text-italic-font returns the font resource for the built-in italic font style. + // + // Result: + // * Go(fyne.Resource) + "default-text-italic-font": { + Doc: "theme.DefaultTextItalicFont", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DefaultTextItalicFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // default-text-monospace-font returns the font resource for the built-in monospace font face. + // + // Result: + // * Go(fyne.Resource) + "default-text-monospace-font": { + Doc: "theme.DefaultTextMonospaceFont", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DefaultTextMonospaceFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // default-theme returns a built-in theme that can adapt to the user preference of light or dark colors. + // + // Since: 2.0 + // + // Result: + // * Go(fyne.Theme) + "default-theme": { + Doc: "theme.DefaultTheme", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DefaultTheme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // delete-icon returns a resource containing the standard delete icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "delete-icon": { + Doc: "theme.DeleteIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DeleteIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // desktop-icon returns a resource containing the standard desktop icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "desktop-icon": { + Doc: "theme.DesktopIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DesktopIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // disabled-button-color returns the theme's disabled button color. + // + // Deprecated: Use Color(theme.ColorNameDisabledButton) instead. + // + // Result: + // * Go(color.Color) + "disabled-button-color": { + Doc: "theme.DisabledButtonColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DisabledButtonColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // disabled-color returns the foreground color for a disabled UI element. + // + // Since: 2.0 + // + // Deprecated: Use Color(theme.ColorNameDisabled) instead. + // + // Result: + // * Go(color.Color) + "disabled-color": { + Doc: "theme.DisabledColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DisabledColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // disabled-text-color returns the theme's disabled text color - this is actually the disabled color since 1.4. + // + // Deprecated: Use Color(theme.ColorNameDisabled) instead. + // + // Result: + // * Go(color.Color) + "disabled-text-color": { + Doc: "theme.DisabledTextColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DisabledTextColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // document-create-icon returns a resource containing the standard document create icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "document-create-icon": { + Doc: "theme.DocumentCreateIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DocumentCreateIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // document-icon returns a resource containing the standard document icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "document-icon": { + Doc: "theme.DocumentIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DocumentIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // document-print-icon returns a resource containing the standard document print icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "document-print-icon": { + Doc: "theme.DocumentPrintIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DocumentPrintIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // document-save-icon returns a resource containing the standard document save icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "document-save-icon": { + Doc: "theme.DocumentSaveIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DocumentSaveIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // download-icon returns a resource containing the standard download icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "download-icon": { + Doc: "theme.DownloadIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.DownloadIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // error-color returns the theme's error foreground color. + // + // Since: 2.0 + // + // Deprecated: Use Color(theme.ColorNameError) instead. + // + // Result: + // * Go(color.Color) + "error-color": { + Doc: "theme.ErrorColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ErrorColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // error-icon returns a resource containing the standard dialog error icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "error-icon": { + Doc: "theme.ErrorIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ErrorIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // file-application-icon returns a resource containing the file icon representing application files for the current theme + // + // Result: + // * Go(fyne.Resource) + "file-application-icon": { + Doc: "theme.FileApplicationIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.FileApplicationIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // file-audio-icon returns a resource containing the file icon representing audio files for the current theme + // + // Result: + // * Go(fyne.Resource) + "file-audio-icon": { + Doc: "theme.FileAudioIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.FileAudioIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // file-icon returns a resource containing the appropriate file icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "file-icon": { + Doc: "theme.FileIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.FileIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // file-image-icon returns a resource containing the file icon representing image files for the current theme + // + // Result: + // * Go(fyne.Resource) + "file-image-icon": { + Doc: "theme.FileImageIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.FileImageIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // file-text-icon returns a resource containing the file icon representing text files for the current theme + // + // Result: + // * Go(fyne.Resource) + "file-text-icon": { + Doc: "theme.FileTextIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.FileTextIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // file-video-icon returns a resource containing the file icon representing video files for the current theme + // + // Result: + // * Go(fyne.Resource) + "file-video-icon": { + Doc: "theme.FileVideoIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.FileVideoIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // focus-color returns the color used to highlight a focused widget. + // + // Deprecated: Use Color(theme.ColorNameFocus) instead. + // + // Result: + // * Go(color.Color) + "focus-color": { + Doc: "theme.FocusColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.FocusColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // folder-icon returns a resource containing the standard folder icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "folder-icon": { + Doc: "theme.FolderIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.FolderIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // folder-new-icon returns a resource containing the standard folder creation icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "folder-new-icon": { + Doc: "theme.FolderNewIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.FolderNewIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // folder-open-icon returns a resource containing the standard folder open icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "folder-open-icon": { + Doc: "theme.FolderOpenIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.FolderOpenIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // font looks up the font for current theme and text style. + // + // Since: 2.5 + // + // Args: + // * style - Go(fyne.TextStyle) + // Result: + // * Go(fyne.Resource) + "font": { + Doc: "theme.Font", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.TextStyle + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + arg0Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("font: arg 1: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("font: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := theme.Font(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // foreground-color returns the theme's standard foreground color for text and icons. + // + // Since: 2.0 + // + // Deprecated: Use Color(theme.ColorNameForeground) instead. + // + // Result: + // * Go(color.Color) + "foreground-color": { + Doc: "theme.ForegroundColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ForegroundColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // from-json returns a Theme created from the given JSON metadata. + // Any values not present in the data will fall back to the default theme. + // If a parse error occurs it will be returned along with a default theme. + // + // Since: 2.2 + // + // Args: + // * data - string + // Result: + // * Go(fyne.Theme) + // * error + "from-json": { + Doc: "theme.FromJSON", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("from-json: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0, resErr := theme.FromJSON(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // from-json-reader returns a Theme created from the given JSON metadata through the reader. + // Any values not present in the data will fall back to the default theme. + // If a parse error occurs it will be returned along with a default theme. + // + // Since: 2.2 + // + // Args: + // * r - Go(io.Reader) + // Result: + // * Go(fyne.Theme) + // * error + "from-json-reader": { + Doc: "theme.FromJSONReader", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val io.Reader + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_io_Reader(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("from-json-reader: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(io.Reader); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("from-json-reader: arg 1: " + "expected native of type io.Reader, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("from-json-reader: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("from-json-reader: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0, resErr := theme.FromJSONReader(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return res0Obj + }, + }, + // from-legacy returns a 2.0 Theme created from the given LegacyTheme data. + // This is a transition path and will be removed in the future (probably version 3.0). + // + // Since: 2.0 + // + // Args: + // * t - Go(fyne.LegacyTheme) + // Result: + // * Go(fyne.Theme) + "from-legacy": { + Doc: "theme.FromLegacy", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.LegacyTheme + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_LegacyTheme(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("from-legacy: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.LegacyTheme); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("from-legacy: arg 1: " + "expected native of type fyne.LegacyTheme, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("from-legacy: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("from-legacy: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := theme.FromLegacy(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // fyne-logo returns a resource containing the Fyne logo. + // + // Deprecated: Applications should use their own icon in most cases. + // + // Result: + // * Go(fyne.Resource) + "fyne-logo": { + Doc: "theme.FyneLogo", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.FyneLogo() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // grid-icon returns a resource containing the standard grid icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "grid-icon": { + Doc: "theme.GridIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.GridIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // header-background-color returns the color used to draw underneath collection headers. + // + // Since: 2.4 + // + // Deprecated: Use Color(theme.ColorNameHeaderBackground) instead. + // + // Result: + // * Go(color.Color) + "header-background-color": { + Doc: "theme.HeaderBackgroundColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.HeaderBackgroundColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // help-icon returns a resource containing the standard help icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "help-icon": { + Doc: "theme.HelpIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.HelpIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // history-icon returns a resource containing the standard history icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "history-icon": { + Doc: "theme.HistoryIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.HistoryIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // home-icon returns a resource containing the standard home folder icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "home-icon": { + Doc: "theme.HomeIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.HomeIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // hover-color returns the color used to highlight interactive elements currently under a cursor. + // + // Deprecated: Use Color(theme.ColorNameHover) instead. + // + // Result: + // * Go(color.Color) + "hover-color": { + Doc: "theme.HoverColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.HoverColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // hyperlink-color returns the color used for the Hyperlink widget and hyperlink text elements. + // + // Deprecated: Use Color(theme.ColorNameHyperlink) instead. + // + // Result: + // * Go(color.Color) + "hyperlink-color": { + Doc: "theme.HyperlinkColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.HyperlinkColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // icon looks up the specified icon for current theme. + // + // Since: 2.5 + // + // Args: + // * name - string + // Result: + // * Go(fyne.Resource) + "icon": { + Doc: "theme.Icon", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ThemeIconName + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal fyne.ThemeIconName + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeIconName) + } + if natValOk { + arg0Val = natVal + } else { + var u string + if vc, ok := arg0.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("icon: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = fyne.ThemeIconName(u) + } + } + res0 := theme.Icon(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // icon-for-widget looks up the specified icon for requested widget using the current theme. + // If the widget theme has been overridden that theme will be used. + // + // Since: 2.5 + // + // Args: + // * name - string + // * w - Go(fyne.Widget) + // Result: + // * Go(fyne.Resource) + "icon-for-widget": { + Doc: "theme.IconForWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ThemeIconName + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal fyne.ThemeIconName + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeIconName) + } + if natValOk { + arg0Val = natVal + } else { + var u string + if vc, ok := arg0.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("icon-for-widget: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = fyne.ThemeIconName(u) + } + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("icon-for-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("icon-for-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("icon-for-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("icon-for-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := theme.IconForWidget(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // icon-inline-size is the standard size of icons which appear within buttons, labels etc. + // + // Result: + // * decimal + "icon-inline-size": { + Doc: "theme.IconInlineSize", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.IconInlineSize() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // Result: + // * string + "icon-name-account": { + Doc: "Get theme.IconNameAccount value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameAccount)) + return resObj + }, + }, + // Result: + // * string + "icon-name-arrow-drop-down": { + Doc: "Get theme.IconNameArrowDropDown value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameArrowDropDown)) + return resObj + }, + }, + // Result: + // * string + "icon-name-arrow-drop-up": { + Doc: "Get theme.IconNameArrowDropUp value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameArrowDropUp)) + return resObj + }, + }, + // Result: + // * string + "icon-name-broken-image": { + Doc: "Get theme.IconNameBrokenImage value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameBrokenImage)) + return resObj + }, + }, + // Result: + // * string + "icon-name-cancel": { + Doc: "Get theme.IconNameCancel value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameCancel)) + return resObj + }, + }, + // Result: + // * string + "icon-name-check-button": { + Doc: "Get theme.IconNameCheckButton value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameCheckButton)) + return resObj + }, + }, + // Result: + // * string + "icon-name-check-button-checked": { + Doc: "Get theme.IconNameCheckButtonChecked value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameCheckButtonChecked)) + return resObj + }, + }, + // Result: + // * string + "icon-name-check-button-fill": { + Doc: "Get theme.IconNameCheckButtonFill value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameCheckButtonFill)) + return resObj + }, + }, + // Result: + // * string + "icon-name-color-achromatic": { + Doc: "Get theme.IconNameColorAchromatic value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameColorAchromatic)) + return resObj + }, + }, + // Result: + // * string + "icon-name-color-chromatic": { + Doc: "Get theme.IconNameColorChromatic value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameColorChromatic)) + return resObj + }, + }, + // Result: + // * string + "icon-name-color-palette": { + Doc: "Get theme.IconNameColorPalette value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameColorPalette)) + return resObj + }, + }, + // Result: + // * string + "icon-name-computer": { + Doc: "Get theme.IconNameComputer value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameComputer)) + return resObj + }, + }, + // Result: + // * string + "icon-name-confirm": { + Doc: "Get theme.IconNameConfirm value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameConfirm)) + return resObj + }, + }, + // Result: + // * string + "icon-name-content-add": { + Doc: "Get theme.IconNameContentAdd value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameContentAdd)) + return resObj + }, + }, + // Result: + // * string + "icon-name-content-clear": { + Doc: "Get theme.IconNameContentClear value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameContentClear)) + return resObj + }, + }, + // Result: + // * string + "icon-name-content-copy": { + Doc: "Get theme.IconNameContentCopy value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameContentCopy)) + return resObj + }, + }, + // Result: + // * string + "icon-name-content-cut": { + Doc: "Get theme.IconNameContentCut value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameContentCut)) + return resObj + }, + }, + // Result: + // * string + "icon-name-content-paste": { + Doc: "Get theme.IconNameContentPaste value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameContentPaste)) + return resObj + }, + }, + // Result: + // * string + "icon-name-content-redo": { + Doc: "Get theme.IconNameContentRedo value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameContentRedo)) + return resObj + }, + }, + // Result: + // * string + "icon-name-content-remove": { + Doc: "Get theme.IconNameContentRemove value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameContentRemove)) + return resObj + }, + }, + // Result: + // * string + "icon-name-content-undo": { + Doc: "Get theme.IconNameContentUndo value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameContentUndo)) + return resObj + }, + }, + // Result: + // * string + "icon-name-delete": { + Doc: "Get theme.IconNameDelete value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameDelete)) + return resObj + }, + }, + // Result: + // * string + "icon-name-desktop": { + Doc: "Get theme.IconNameDesktop value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameDesktop)) + return resObj + }, + }, + // Result: + // * string + "icon-name-document": { + Doc: "Get theme.IconNameDocument value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameDocument)) + return resObj + }, + }, + // Result: + // * string + "icon-name-document-create": { + Doc: "Get theme.IconNameDocumentCreate value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameDocumentCreate)) + return resObj + }, + }, + // Result: + // * string + "icon-name-document-print": { + Doc: "Get theme.IconNameDocumentPrint value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameDocumentPrint)) + return resObj + }, + }, + // Result: + // * string + "icon-name-document-save": { + Doc: "Get theme.IconNameDocumentSave value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameDocumentSave)) + return resObj + }, + }, + // Result: + // * string + "icon-name-download": { + Doc: "Get theme.IconNameDownload value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameDownload)) + return resObj + }, + }, + // Result: + // * string + "icon-name-drag-corner-indicator": { + Doc: "Get theme.IconNameDragCornerIndicator value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameDragCornerIndicator)) + return resObj + }, + }, + // Result: + // * string + "icon-name-error": { + Doc: "Get theme.IconNameError value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameError)) + return resObj + }, + }, + // Result: + // * string + "icon-name-file": { + Doc: "Get theme.IconNameFile value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameFile)) + return resObj + }, + }, + // Result: + // * string + "icon-name-file-application": { + Doc: "Get theme.IconNameFileApplication value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameFileApplication)) + return resObj + }, + }, + // Result: + // * string + "icon-name-file-audio": { + Doc: "Get theme.IconNameFileAudio value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameFileAudio)) + return resObj + }, + }, + // Result: + // * string + "icon-name-file-image": { + Doc: "Get theme.IconNameFileImage value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameFileImage)) + return resObj + }, + }, + // Result: + // * string + "icon-name-file-text": { + Doc: "Get theme.IconNameFileText value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameFileText)) + return resObj + }, + }, + // Result: + // * string + "icon-name-file-video": { + Doc: "Get theme.IconNameFileVideo value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameFileVideo)) + return resObj + }, + }, + // Result: + // * string + "icon-name-folder": { + Doc: "Get theme.IconNameFolder value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameFolder)) + return resObj + }, + }, + // Result: + // * string + "icon-name-folder-new": { + Doc: "Get theme.IconNameFolderNew value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameFolderNew)) + return resObj + }, + }, + // Result: + // * string + "icon-name-folder-open": { + Doc: "Get theme.IconNameFolderOpen value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameFolderOpen)) + return resObj + }, + }, + // Result: + // * string + "icon-name-grid": { + Doc: "Get theme.IconNameGrid value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameGrid)) + return resObj + }, + }, + // Result: + // * string + "icon-name-help": { + Doc: "Get theme.IconNameHelp value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameHelp)) + return resObj + }, + }, + // Result: + // * string + "icon-name-history": { + Doc: "Get theme.IconNameHistory value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameHistory)) + return resObj + }, + }, + // Result: + // * string + "icon-name-home": { + Doc: "Get theme.IconNameHome value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameHome)) + return resObj + }, + }, + // Result: + // * string + "icon-name-info": { + Doc: "Get theme.IconNameInfo value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameInfo)) + return resObj + }, + }, + // Result: + // * string + "icon-name-list": { + Doc: "Get theme.IconNameList value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameList)) + return resObj + }, + }, + // Result: + // * string + "icon-name-login": { + Doc: "Get theme.IconNameLogin value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameLogin)) + return resObj + }, + }, + // Result: + // * string + "icon-name-logout": { + Doc: "Get theme.IconNameLogout value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameLogout)) + return resObj + }, + }, + // Result: + // * string + "icon-name-mail-attachment": { + Doc: "Get theme.IconNameMailAttachment value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMailAttachment)) + return resObj + }, + }, + // Result: + // * string + "icon-name-mail-compose": { + Doc: "Get theme.IconNameMailCompose value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMailCompose)) + return resObj + }, + }, + // Result: + // * string + "icon-name-mail-forward": { + Doc: "Get theme.IconNameMailForward value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMailForward)) + return resObj + }, + }, + // Result: + // * string + "icon-name-mail-reply": { + Doc: "Get theme.IconNameMailReply value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMailReply)) + return resObj + }, + }, + // Result: + // * string + "icon-name-mail-reply-all": { + Doc: "Get theme.IconNameMailReplyAll value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMailReplyAll)) + return resObj + }, + }, + // Result: + // * string + "icon-name-mail-send": { + Doc: "Get theme.IconNameMailSend value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMailSend)) + return resObj + }, + }, + // Result: + // * string + "icon-name-media-fast-forward": { + Doc: "Get theme.IconNameMediaFastForward value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMediaFastForward)) + return resObj + }, + }, + // Result: + // * string + "icon-name-media-fast-rewind": { + Doc: "Get theme.IconNameMediaFastRewind value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMediaFastRewind)) + return resObj + }, + }, + // Result: + // * string + "icon-name-media-music": { + Doc: "Get theme.IconNameMediaMusic value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMediaMusic)) + return resObj + }, + }, + // Result: + // * string + "icon-name-media-pause": { + Doc: "Get theme.IconNameMediaPause value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMediaPause)) + return resObj + }, + }, + // Result: + // * string + "icon-name-media-photo": { + Doc: "Get theme.IconNameMediaPhoto value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMediaPhoto)) + return resObj + }, + }, + // Result: + // * string + "icon-name-media-play": { + Doc: "Get theme.IconNameMediaPlay value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMediaPlay)) + return resObj + }, + }, + // Result: + // * string + "icon-name-media-record": { + Doc: "Get theme.IconNameMediaRecord value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMediaRecord)) + return resObj + }, + }, + // Result: + // * string + "icon-name-media-replay": { + Doc: "Get theme.IconNameMediaReplay value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMediaReplay)) + return resObj + }, + }, + // Result: + // * string + "icon-name-media-skip-next": { + Doc: "Get theme.IconNameMediaSkipNext value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMediaSkipNext)) + return resObj + }, + }, + // Result: + // * string + "icon-name-media-skip-previous": { + Doc: "Get theme.IconNameMediaSkipPrevious value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMediaSkipPrevious)) + return resObj + }, + }, + // Result: + // * string + "icon-name-media-stop": { + Doc: "Get theme.IconNameMediaStop value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMediaStop)) + return resObj + }, + }, + // Result: + // * string + "icon-name-media-video": { + Doc: "Get theme.IconNameMediaVideo value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMediaVideo)) + return resObj + }, + }, + // Result: + // * string + "icon-name-menu": { + Doc: "Get theme.IconNameMenu value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMenu)) + return resObj + }, + }, + // Result: + // * string + "icon-name-menu-expand": { + Doc: "Get theme.IconNameMenuExpand value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMenuExpand)) + return resObj + }, + }, + // Result: + // * string + "icon-name-more-horizontal": { + Doc: "Get theme.IconNameMoreHorizontal value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMoreHorizontal)) + return resObj + }, + }, + // Result: + // * string + "icon-name-more-vertical": { + Doc: "Get theme.IconNameMoreVertical value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMoreVertical)) + return resObj + }, + }, + // Result: + // * string + "icon-name-move-down": { + Doc: "Get theme.IconNameMoveDown value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMoveDown)) + return resObj + }, + }, + // Result: + // * string + "icon-name-move-up": { + Doc: "Get theme.IconNameMoveUp value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameMoveUp)) + return resObj + }, + }, + // Result: + // * string + "icon-name-navigate-back": { + Doc: "Get theme.IconNameNavigateBack value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameNavigateBack)) + return resObj + }, + }, + // Result: + // * string + "icon-name-navigate-next": { + Doc: "Get theme.IconNameNavigateNext value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameNavigateNext)) + return resObj + }, + }, + // Result: + // * string + "icon-name-question": { + Doc: "Get theme.IconNameQuestion value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameQuestion)) + return resObj + }, + }, + // Result: + // * string + "icon-name-radio-button": { + Doc: "Get theme.IconNameRadioButton value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameRadioButton)) + return resObj + }, + }, + // Result: + // * string + "icon-name-radio-button-checked": { + Doc: "Get theme.IconNameRadioButtonChecked value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameRadioButtonChecked)) + return resObj + }, + }, + // Result: + // * string + "icon-name-radio-button-fill": { + Doc: "Get theme.IconNameRadioButtonFill value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameRadioButtonFill)) + return resObj + }, + }, + // Result: + // * string + "icon-name-search": { + Doc: "Get theme.IconNameSearch value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameSearch)) + return resObj + }, + }, + // Result: + // * string + "icon-name-search-replace": { + Doc: "Get theme.IconNameSearchReplace value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameSearchReplace)) + return resObj + }, + }, + // Result: + // * string + "icon-name-settings": { + Doc: "Get theme.IconNameSettings value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameSettings)) + return resObj + }, + }, + // Result: + // * string + "icon-name-storage": { + Doc: "Get theme.IconNameStorage value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameStorage)) + return resObj + }, + }, + // Result: + // * string + "icon-name-upload": { + Doc: "Get theme.IconNameUpload value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameUpload)) + return resObj + }, + }, + // Result: + // * string + "icon-name-view-full-screen": { + Doc: "Get theme.IconNameViewFullScreen value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameViewFullScreen)) + return resObj + }, + }, + // Result: + // * string + "icon-name-view-refresh": { + Doc: "Get theme.IconNameViewRefresh value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameViewRefresh)) + return resObj + }, + }, + // Result: + // * string + "icon-name-view-restore": { + Doc: "Get theme.IconNameViewRestore value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameViewRestore)) + return resObj + }, + }, + // Result: + // * string + "icon-name-view-zoom-fit": { + Doc: "Get theme.IconNameViewZoomFit value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameViewZoomFit)) + return resObj + }, + }, + // Result: + // * string + "icon-name-view-zoom-in": { + Doc: "Get theme.IconNameViewZoomIn value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameViewZoomIn)) + return resObj + }, + }, + // Result: + // * string + "icon-name-view-zoom-out": { + Doc: "Get theme.IconNameViewZoomOut value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameViewZoomOut)) + return resObj + }, + }, + // Result: + // * string + "icon-name-visibility": { + Doc: "Get theme.IconNameVisibility value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameVisibility)) + return resObj + }, + }, + // Result: + // * string + "icon-name-visibility-off": { + Doc: "Get theme.IconNameVisibilityOff value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameVisibilityOff)) + return resObj + }, + }, + // Result: + // * string + "icon-name-volume-down": { + Doc: "Get theme.IconNameVolumeDown value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameVolumeDown)) + return resObj + }, + }, + // Result: + // * string + "icon-name-volume-mute": { + Doc: "Get theme.IconNameVolumeMute value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameVolumeMute)) + return resObj + }, + }, + // Result: + // * string + "icon-name-volume-up": { + Doc: "Get theme.IconNameVolumeUp value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameVolumeUp)) + return resObj + }, + }, + // Result: + // * string + "icon-name-warning": { + Doc: "Get theme.IconNameWarning value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameWarning)) + return resObj + }, + }, + // Result: + // * string + "icon-name-window-close": { + Doc: "Get theme.IconNameWindowClose value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameWindowClose)) + return resObj + }, + }, + // Result: + // * string + "icon-name-window-maximize": { + Doc: "Get theme.IconNameWindowMaximize value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameWindowMaximize)) + return resObj + }, + }, + // Result: + // * string + "icon-name-window-minimize": { + Doc: "Get theme.IconNameWindowMinimize value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.IconNameWindowMinimize)) + return resObj + }, + }, + // info-icon returns a resource containing the standard dialog info icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "info-icon": { + Doc: "theme.InfoIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.InfoIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // inner-padding is the standard gap between element content and the outside edge of a widget. + // + // Since: 2.3 + // + // Result: + // * decimal + "inner-padding": { + Doc: "theme.InnerPadding", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.InnerPadding() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // input-background-color returns the color used to draw underneath input elements. + // + // Deprecated: Use Color(theme.ColorNameInputBackground) instead. + // + // Result: + // * Go(color.Color) + "input-background-color": { + Doc: "theme.InputBackgroundColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.InputBackgroundColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // input-border-color returns the color used to draw underneath input elements. + // + // Since: 2.3 + // + // Deprecated: Use Color(theme.ColorNameInputBorder) instead. + // + // Result: + // * Go(color.Color) + "input-border-color": { + Doc: "theme.InputBorderColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.InputBorderColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // input-border-size returns the input border size (or underline size for an entry). + // + // Since: 2.0 + // + // Result: + // * decimal + "input-border-size": { + Doc: "theme.InputBorderSize", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.InputBorderSize() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // input-radius-size returns the input radius size. + // + // Since: 2.4 + // + // Result: + // * decimal + "input-radius-size": { + Doc: "theme.InputRadiusSize", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.InputRadiusSize() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // light-theme defines the built-in light theme colors and sizes. + // + // Deprecated: This method ignores user preference and should not be used, it will be removed in v3.0. + // If developers want to ignore user preference for theme variant they can set a custom theme. + // + // Result: + // * Go(fyne.Theme) + "light-theme": { + Doc: "theme.LightTheme", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.LightTheme() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Theme)") + return res0Obj + }, + }, + // line-spacing is the default gap between multiple lines of text. + // + // Since: 2.3 + // + // Result: + // * decimal + "line-spacing": { + Doc: "theme.LineSpacing", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.LineSpacing() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // list-icon returns a resource containing the standard list icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "list-icon": { + Doc: "theme.ListIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ListIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // login-icon returns a resource containing the standard login icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "login-icon": { + Doc: "theme.LoginIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.LoginIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // logout-icon returns a resource containing the standard logout icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "logout-icon": { + Doc: "theme.LogoutIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.LogoutIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // mail-attachment-icon returns a resource containing the standard mail attachment icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "mail-attachment-icon": { + Doc: "theme.MailAttachmentIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MailAttachmentIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // mail-compose-icon returns a resource containing the standard mail compose icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "mail-compose-icon": { + Doc: "theme.MailComposeIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MailComposeIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // mail-forward-icon returns a resource containing the standard mail forward icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "mail-forward-icon": { + Doc: "theme.MailForwardIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MailForwardIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // mail-reply-all-icon returns a resource containing the standard mail reply all icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "mail-reply-all-icon": { + Doc: "theme.MailReplyAllIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MailReplyAllIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // mail-reply-icon returns a resource containing the standard mail reply icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "mail-reply-icon": { + Doc: "theme.MailReplyIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MailReplyIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // mail-send-icon returns a resource containing the standard mail send icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "mail-send-icon": { + Doc: "theme.MailSendIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MailSendIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // media-fast-forward-icon returns a resource containing the standard media fast-forward icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "media-fast-forward-icon": { + Doc: "theme.MediaFastForwardIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MediaFastForwardIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // media-fast-rewind-icon returns a resource containing the standard media fast-rewind icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "media-fast-rewind-icon": { + Doc: "theme.MediaFastRewindIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MediaFastRewindIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // media-music-icon returns a resource containing the standard media music icon for the current theme + // + // Since: 2.1 + // + // Result: + // * Go(fyne.Resource) + "media-music-icon": { + Doc: "theme.MediaMusicIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MediaMusicIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // media-pause-icon returns a resource containing the standard media pause icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "media-pause-icon": { + Doc: "theme.MediaPauseIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MediaPauseIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // media-photo-icon returns a resource containing the standard media photo icon for the current theme + // + // Since: 2.1 + // + // Result: + // * Go(fyne.Resource) + "media-photo-icon": { + Doc: "theme.MediaPhotoIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MediaPhotoIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // media-play-icon returns a resource containing the standard media play icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "media-play-icon": { + Doc: "theme.MediaPlayIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MediaPlayIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // media-record-icon returns a resource containing the standard media record icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "media-record-icon": { + Doc: "theme.MediaRecordIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MediaRecordIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // media-replay-icon returns a resource containing the standard media replay icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "media-replay-icon": { + Doc: "theme.MediaReplayIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MediaReplayIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // media-skip-next-icon returns a resource containing the standard media skip next icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "media-skip-next-icon": { + Doc: "theme.MediaSkipNextIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MediaSkipNextIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // media-skip-previous-icon returns a resource containing the standard media skip previous icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "media-skip-previous-icon": { + Doc: "theme.MediaSkipPreviousIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MediaSkipPreviousIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // media-stop-icon returns a resource containing the standard media stop icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "media-stop-icon": { + Doc: "theme.MediaStopIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MediaStopIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // media-video-icon returns a resource containing the standard media video icon for the current theme + // + // Since: 2.1 + // + // Result: + // * Go(fyne.Resource) + "media-video-icon": { + Doc: "theme.MediaVideoIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MediaVideoIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // menu-background-color returns the theme's background color for menus. + // + // Since: 2.3 + // + // Deprecated: Use Color(theme.ColorNameMenuBackground) instead. + // + // Result: + // * Go(color.Color) + "menu-background-color": { + Doc: "theme.MenuBackgroundColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MenuBackgroundColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // menu-drop-down-icon returns a resource containing the standard menu drop down icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "menu-drop-down-icon": { + Doc: "theme.MenuDropDownIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MenuDropDownIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // menu-drop-up-icon returns a resource containing the standard menu drop up icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "menu-drop-up-icon": { + Doc: "theme.MenuDropUpIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MenuDropUpIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // menu-expand-icon returns a resource containing the standard (mobile) expand "submenu icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "menu-expand-icon": { + Doc: "theme.MenuExpandIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MenuExpandIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // menu-icon returns a resource containing the standard (mobile) menu icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "menu-icon": { + Doc: "theme.MenuIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MenuIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // more-horizontal-icon returns a resource containing the standard horizontal more icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "more-horizontal-icon": { + Doc: "theme.MoreHorizontalIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MoreHorizontalIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // more-vertical-icon returns a resource containing the standard vertical more icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "more-vertical-icon": { + Doc: "theme.MoreVerticalIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MoreVerticalIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // move-down-icon returns a resource containing the standard down arrow icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "move-down-icon": { + Doc: "theme.MoveDownIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MoveDownIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // move-up-icon returns a resource containing the standard up arrow icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "move-up-icon": { + Doc: "theme.MoveUpIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.MoveUpIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // navigate-back-icon returns a resource containing the standard backward navigation icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "navigate-back-icon": { + Doc: "theme.NavigateBackIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.NavigateBackIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // navigate-next-icon returns a resource containing the standard forward navigation icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "navigate-next-icon": { + Doc: "theme.NavigateNextIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.NavigateNextIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // colored-resource creates a resource that adapts to the current theme setting using + // the color named in the constructor. + // + // Since: 2.4 + // + // Args: + // * src - Go(fyne.Resource) + // * name - string + // Result: + // * Go(*theme.ThemedResource) + "colored-resource": { + Doc: "theme.NewColoredResource", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Resource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("colored-resource: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("colored-resource: arg 1: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("colored-resource: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("colored-resource: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.ThemeColorName + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.ThemeColorName + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeColorName) + } + if natValOk { + arg1Val = natVal + } else { + var u string + if vc, ok := arg1.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("colored-resource: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = fyne.ThemeColorName(u) + } + } + res0 := theme.NewColoredResource(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*theme.ThemedResource)") + return res0Obj + }, + }, + // disabled-resource creates a resource that adapts to the current theme's DisabledColor setting. + // + // Args: + // * res - Go(fyne.Resource) + // Result: + // * Go(*theme.DisabledResource) + "disabled-resource": { + Doc: "theme.NewDisabledResource", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Resource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("disabled-resource: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("disabled-resource: arg 1: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("disabled-resource: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("disabled-resource: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := theme.NewDisabledResource(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*theme.DisabledResource)") + return res0Obj + }, + }, + // error-themed-resource creates a resource that adapts to the error color for the current theme. + // + // Args: + // * orig - Go(fyne.Resource) + // Result: + // * Go(*theme.ErrorThemedResource) + "error-themed-resource": { + Doc: "theme.NewErrorThemedResource", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Resource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("error-themed-resource: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("error-themed-resource: arg 1: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("error-themed-resource: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("error-themed-resource: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := theme.NewErrorThemedResource(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*theme.ErrorThemedResource)") + return res0Obj + }, + }, + // inverted-themed-resource creates a resource that adapts to the current theme for use over highlighted elements. + // + // Args: + // * orig - Go(fyne.Resource) + // Result: + // * Go(*theme.InvertedThemedResource) + "inverted-themed-resource": { + Doc: "theme.NewInvertedThemedResource", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Resource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("inverted-themed-resource: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("inverted-themed-resource: arg 1: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("inverted-themed-resource: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("inverted-themed-resource: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := theme.NewInvertedThemedResource(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*theme.InvertedThemedResource)") + return res0Obj + }, + }, + // primary-themed-resource creates a resource that adapts to the primary color for the current theme. + // + // Args: + // * orig - Go(fyne.Resource) + // Result: + // * Go(*theme.PrimaryThemedResource) + "primary-themed-resource": { + Doc: "theme.NewPrimaryThemedResource", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Resource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("primary-themed-resource: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("primary-themed-resource: arg 1: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("primary-themed-resource: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("primary-themed-resource: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := theme.NewPrimaryThemedResource(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*theme.PrimaryThemedResource)") + return res0Obj + }, + }, + // success-themed-resource creates a resource that adapts to the current theme success color. + // + // Since: 2.4 + // + // Args: + // * src - Go(fyne.Resource) + // Result: + // * Go(*theme.ThemedResource) + "success-themed-resource": { + Doc: "theme.NewSuccessThemedResource", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Resource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("success-themed-resource: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("success-themed-resource: arg 1: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("success-themed-resource: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("success-themed-resource: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := theme.NewSuccessThemedResource(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*theme.ThemedResource)") + return res0Obj + }, + }, + // themed-resource creates a resource that adapts to the current theme setting. + // By default, this will match the foreground color, but it can be changed using the `ColorName` field. + // + // Args: + // * src - Go(fyne.Resource) + // Result: + // * Go(*theme.ThemedResource) + "themed-resource": { + Doc: "theme.NewThemedResource", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Resource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("themed-resource: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("themed-resource: arg 1: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("themed-resource: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("themed-resource: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := theme.NewThemedResource(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*theme.ThemedResource)") + return res0Obj + }, + }, + // warning-themed-resource creates a resource that adapts to the current theme warning color. + // + // Since: 2.4 + // + // Args: + // * src - Go(fyne.Resource) + // Result: + // * Go(*theme.ThemedResource) + "warning-themed-resource": { + Doc: "theme.NewWarningThemedResource", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Resource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("warning-themed-resource: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("warning-themed-resource: arg 1: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("warning-themed-resource: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("warning-themed-resource: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := theme.NewWarningThemedResource(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*theme.ThemedResource)") + return res0Obj + }, + }, + // overlay-background-color returns the theme's background color for overlays like dialogs. + // + // Since: 2.3 + // + // Deprecated: Use Color(theme.ColorNameOverlayBackground) instead. + // + // Result: + // * Go(color.Color) + "overlay-background-color": { + Doc: "theme.OverlayBackgroundColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.OverlayBackgroundColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // padding is the standard gap between elements and the border around interface elements. + // + // Result: + // * decimal + "padding": { + Doc: "theme.Padding", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.Padding() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // place-holder-color returns the theme's standard text color. + // + // Deprecated: Use Color(theme.ColorNamePlaceHolder) instead. + // + // Result: + // * Go(color.Color) + "place-holder-color": { + Doc: "theme.PlaceHolderColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.PlaceHolderColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // pressed-color returns the color used to overlap tapped features. + // + // Since: 2.0 + // + // Deprecated: Use Color(theme.ColorNamePressed) instead. + // + // Result: + // * Go(color.Color) + "pressed-color": { + Doc: "theme.PressedColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.PressedColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // primary-color returns the color used to highlight primary features. + // + // Deprecated: Use Color(theme.ColorNamePrimary) instead. + // + // Result: + // * Go(color.Color) + "primary-color": { + Doc: "theme.PrimaryColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.PrimaryColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // primary-color-named returns a theme specific color value for a named primary color. + // + // Since: 1.4 + // + // Deprecated: You should not access named primary colors but access the primary color using Color(theme.ColorNamePrimary) instead. + // + // Args: + // * name - string + // Result: + // * Go(color.Color) + "primary-color-named": { + Doc: "theme.PrimaryColorNamed", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("primary-color-named: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := theme.PrimaryColorNamed(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // primary-color-names returns a list of the standard primary color options. + // + // Since: 1.4 + // + // Result: + // * block[string] + "primary-color-names": { + Doc: "theme.PrimaryColorNames", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.PrimaryColorNames() + var res0Obj env.Object + { + items := make([]env.Object, len(res0)) + for i, it := range res0 { + items[i] = *env.NewString(it) + } + res0Obj = *env.NewBlock(*env.NewTSeries(items)) + } + return res0Obj + }, + }, + // question-icon returns a resource containing the standard dialog question icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "question-icon": { + Doc: "theme.QuestionIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.QuestionIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // radio-button-checked-icon returns a resource containing the standard radio button checked icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "radio-button-checked-icon": { + Doc: "theme.RadioButtonCheckedIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.RadioButtonCheckedIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // radio-button-fill-icon returns a resource containing the filled checkbox icon for the current theme. + // + // Since: 2.5 + // + // Result: + // * Go(fyne.Resource) + "radio-button-fill-icon": { + Doc: "theme.RadioButtonFillIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.RadioButtonFillIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // radio-button-icon returns a resource containing the standard radio button icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "radio-button-icon": { + Doc: "theme.RadioButtonIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.RadioButtonIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // scroll-bar-color returns the color (and translucency) for a scrollBar. + // + // Deprecated: Use Color(theme.ColorNameScrollBar) instead. + // + // Result: + // * Go(color.Color) + "scroll-bar-color": { + Doc: "theme.ScrollBarColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ScrollBarColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // scroll-bar-size is the width (or height) of the bars on a ScrollContainer. + // + // Result: + // * decimal + "scroll-bar-size": { + Doc: "theme.ScrollBarSize", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ScrollBarSize() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // scroll-bar-small-size is the width (or height) of the minimized bars on a ScrollContainer. + // + // Result: + // * decimal + "scroll-bar-small-size": { + Doc: "theme.ScrollBarSmallSize", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ScrollBarSmallSize() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // search-icon returns a resource containing the standard search icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "search-icon": { + Doc: "theme.SearchIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.SearchIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // search-replace-icon returns a resource containing the standard search and replace icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "search-replace-icon": { + Doc: "theme.SearchReplaceIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.SearchReplaceIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // selection-color returns the color for a selected element. + // + // Since: 2.1 + // + // Deprecated: Use Color(theme.ColorNameSelection) instead. + // + // Result: + // * Go(color.Color) + "selection-color": { + Doc: "theme.SelectionColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.SelectionColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // selection-radius-size returns the selection highlight radius size. + // + // Since: 2.4 + // + // Result: + // * decimal + "selection-radius-size": { + Doc: "theme.SelectionRadiusSize", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.SelectionRadiusSize() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // separator-color returns the color for the separator element. + // + // Since: 2.3 + // + // Deprecated: Use Color(theme.ColorNameSeparator) instead. + // + // Result: + // * Go(color.Color) + "separator-color": { + Doc: "theme.SeparatorColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.SeparatorColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // separator-thickness-size is the standard thickness of the separator widget. + // + // Since: 2.0 + // + // Result: + // * decimal + "separator-thickness-size": { + Doc: "theme.SeparatorThicknessSize", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.SeparatorThicknessSize() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // settings-icon returns a resource containing the standard settings icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "settings-icon": { + Doc: "theme.SettingsIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.SettingsIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // shadow-color returns the color (and translucency) for shadows used for indicating elevation. + // + // Deprecated: Use Color(theme.ColorNameShadow) instead. + // + // Result: + // * Go(color.Color) + "shadow-color": { + Doc: "theme.ShadowColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ShadowColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // theme-size looks up the specified size for current theme. + // + // Since: 2.5 + // + // Args: + // * name - string + // Result: + // * decimal + "theme-size": { + Doc: "theme.Size", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ThemeSizeName + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal fyne.ThemeSizeName + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeSizeName) + } + if natValOk { + arg0Val = natVal + } else { + var u string + if vc, ok := arg0.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("theme-size: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = fyne.ThemeSizeName(u) + } + } + res0 := theme.Size(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // size-for-widget looks up the specified size for the requested widget using the current theme. + // If the widget theme has been overridden that theme will be used. + // + // Since: 2.5 + // + // Args: + // * name - string + // * w - Go(fyne.Widget) + // Result: + // * decimal + "size-for-widget": { + Doc: "theme.SizeForWidget", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.ThemeSizeName + { + nat, natOk := arg0.(env.Native) + var natValOk bool + var natVal fyne.ThemeSizeName + if natOk { + natVal, natValOk = nat.Value.(fyne.ThemeSizeName) + } + if natValOk { + arg0Val = natVal + } else { + var u string + if vc, ok := arg0.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("size-for-widget: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + arg0Val = fyne.ThemeSizeName(u) + } + } + var arg1Val fyne.Widget + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Widget(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("size-for-widget: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Widget); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("size-for-widget: arg 2: " + "expected native of type fyne.Widget, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("size-for-widget: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("size-for-widget: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := theme.SizeForWidget(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // Result: + // * string + "size-name-caption-text": { + Doc: "Get theme.SizeNameCaptionText value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.SizeNameCaptionText)) + return resObj + }, + }, + // Result: + // * string + "size-name-heading-text": { + Doc: "Get theme.SizeNameHeadingText value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.SizeNameHeadingText)) + return resObj + }, + }, + // Result: + // * string + "size-name-inline-icon": { + Doc: "Get theme.SizeNameInlineIcon value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.SizeNameInlineIcon)) + return resObj + }, + }, + // Result: + // * string + "size-name-inner-padding": { + Doc: "Get theme.SizeNameInnerPadding value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.SizeNameInnerPadding)) + return resObj + }, + }, + // Result: + // * string + "size-name-input-border": { + Doc: "Get theme.SizeNameInputBorder value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.SizeNameInputBorder)) + return resObj + }, + }, + // Result: + // * string + "size-name-input-radius": { + Doc: "Get theme.SizeNameInputRadius value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.SizeNameInputRadius)) + return resObj + }, + }, + // Result: + // * string + "size-name-line-spacing": { + Doc: "Get theme.SizeNameLineSpacing value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.SizeNameLineSpacing)) + return resObj + }, + }, + // Result: + // * string + "size-name-padding": { + Doc: "Get theme.SizeNamePadding value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.SizeNamePadding)) + return resObj + }, + }, + // Result: + // * string + "size-name-scroll-bar": { + Doc: "Get theme.SizeNameScrollBar value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.SizeNameScrollBar)) + return resObj + }, + }, + // Result: + // * string + "size-name-scroll-bar-radius": { + Doc: "Get theme.SizeNameScrollBarRadius value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(theme.SizeNameScrollBarRadius) + return resObj + }, + }, + // Result: + // * string + "size-name-scroll-bar-small": { + Doc: "Get theme.SizeNameScrollBarSmall value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.SizeNameScrollBarSmall)) + return resObj + }, + }, + // Result: + // * string + "size-name-selection-radius": { + Doc: "Get theme.SizeNameSelectionRadius value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.SizeNameSelectionRadius)) + return resObj + }, + }, + // Result: + // * string + "size-name-separator-thickness": { + Doc: "Get theme.SizeNameSeparatorThickness value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.SizeNameSeparatorThickness)) + return resObj + }, + }, + // Result: + // * string + "size-name-sub-heading-text": { + Doc: "Get theme.SizeNameSubHeadingText value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.SizeNameSubHeadingText)) + return resObj + }, + }, + // Result: + // * string + "size-name-text": { + Doc: "Get theme.SizeNameText value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewString(string(theme.SizeNameText)) + return resObj + }, + }, + // storage-icon returns a resource containing the standard storage icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "storage-icon": { + Doc: "theme.StorageIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.StorageIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // success-color returns the theme's success foreground color. + // + // Since: 2.3 + // + // Deprecated: Use Color(theme.ColorNameSuccess) instead. + // + // Result: + // * Go(color.Color) + "success-color": { + Doc: "theme.SuccessColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.SuccessColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // symbol-font returns the font resource for the symbol font style. + // + // Since: 2.4 + // + // Result: + // * Go(fyne.Resource) + "symbol-font": { + Doc: "theme.SymbolFont", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.SymbolFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // text-bold-font returns the font resource for the bold font style. + // + // Result: + // * Go(fyne.Resource) + "text-bold-font": { + Doc: "theme.TextBoldFont", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.TextBoldFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // text-bold-italic-font returns the font resource for the bold and italic font style. + // + // Result: + // * Go(fyne.Resource) + "text-bold-italic-font": { + Doc: "theme.TextBoldItalicFont", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.TextBoldItalicFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // text-color returns the theme's standard text color - this is actually the foreground color since 1.4. + // + // Deprecated: Use theme.ForegroundColor() colour instead. + // + // Result: + // * Go(color.Color) + "text-color": { + Doc: "theme.TextColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.TextColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // text-font returns the font resource for the regular font style. + // + // Result: + // * Go(fyne.Resource) + "text-font": { + Doc: "theme.TextFont", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.TextFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // text-heading-size returns the text size for header text. + // + // Since: 2.1 + // + // Result: + // * decimal + "text-heading-size": { + Doc: "theme.TextHeadingSize", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.TextHeadingSize() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // text-italic-font returns the font resource for the italic font style. + // + // Result: + // * Go(fyne.Resource) + "text-italic-font": { + Doc: "theme.TextItalicFont", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.TextItalicFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // text-monospace-font returns the font resource for the monospace font face. + // + // Result: + // * Go(fyne.Resource) + "text-monospace-font": { + Doc: "theme.TextMonospaceFont", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.TextMonospaceFont() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // text-size returns the standard text size. + // + // Result: + // * decimal + "text-size": { + Doc: "theme.TextSize", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.TextSize() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // text-sub-heading-size returns the text size for sub-header text. + // + // Since: 2.1 + // + // Result: + // * decimal + "text-sub-heading-size": { + Doc: "theme.TextSubHeadingSize", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.TextSubHeadingSize() + var res0Obj env.Object + res0Obj = *env.NewDecimal(float64(res0)) + return res0Obj + }, + }, + // upload-icon returns a resource containing the standard upload icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "upload-icon": { + Doc: "theme.UploadIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.UploadIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // view-full-screen-icon returns a resource containing the standard fullscreen icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "view-full-screen-icon": { + Doc: "theme.ViewFullScreenIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ViewFullScreenIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // view-refresh-icon returns a resource containing the standard refresh icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "view-refresh-icon": { + Doc: "theme.ViewRefreshIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ViewRefreshIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // view-restore-icon returns a resource containing the standard exit fullscreen icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "view-restore-icon": { + Doc: "theme.ViewRestoreIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ViewRestoreIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // visibility-icon returns a resource containing the standard visibility icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "visibility-icon": { + Doc: "theme.VisibilityIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.VisibilityIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // visibility-off-icon returns a resource containing the standard visibility off icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "visibility-off-icon": { + Doc: "theme.VisibilityOffIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.VisibilityOffIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // volume-down-icon returns a resource containing the standard volume down icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "volume-down-icon": { + Doc: "theme.VolumeDownIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.VolumeDownIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // volume-mute-icon returns a resource containing the standard volume mute icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "volume-mute-icon": { + Doc: "theme.VolumeMuteIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.VolumeMuteIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // volume-up-icon returns a resource containing the standard volume up icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "volume-up-icon": { + Doc: "theme.VolumeUpIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.VolumeUpIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // warning-color returns the theme's warning foreground color. + // + // Since: 2.3 + // + // Deprecated: Use Color(theme.ColorNameWarning) instead. + // + // Result: + // * Go(color.Color) + "warning-color": { + Doc: "theme.WarningColor", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.WarningColor() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(color.Color)") + return res0Obj + }, + }, + // warning-icon returns a resource containing the standard dialog warning icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "warning-icon": { + Doc: "theme.WarningIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.WarningIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // window-close-icon returns a resource containing the window close icon for the current theme + // + // Since: 2.5 + // + // Result: + // * Go(fyne.Resource) + "window-close-icon": { + Doc: "theme.WindowCloseIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.WindowCloseIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // window-maximize-icon returns a resource containing the window maximize icon for the current theme + // + // Since: 2.5 + // + // Result: + // * Go(fyne.Resource) + "window-maximize-icon": { + Doc: "theme.WindowMaximizeIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.WindowMaximizeIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // window-minimize-icon returns a resource containing the window minimize icon for the current theme + // + // Since: 2.5 + // + // Result: + // * Go(fyne.Resource) + "window-minimize-icon": { + Doc: "theme.WindowMinimizeIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.WindowMinimizeIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // zoom-fit-icon returns a resource containing the standard zoom fit icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "zoom-fit-icon": { + Doc: "theme.ZoomFitIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ZoomFitIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // zoom-in-icon returns a resource containing the standard zoom in icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "zoom-in-icon": { + Doc: "theme.ZoomInIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ZoomInIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // zoom-out-icon returns a resource containing the standard zoom out icon for the current theme + // + // Result: + // * Go(fyne.Resource) + "zoom-out-icon": { + Doc: "theme.ZoomOutIcon", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := theme.ZoomOutIcon() + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.Resource)") + return res0Obj + }, + }, + // validation-all-strings creates a validator that requires all of the passed string validators to pass. + // In short, it combines multiple string validators into one. + // + // Since: 2.2 + // + // Args: + // * validators - block[fn { string } -> Go(error)] + // Result: + // * fn { string } -> Go(error) + "validation-all-strings": { + Doc: "validation.NewAllStrings", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []fyne.StringValidator + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]fyne.StringValidator, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + { + nat, natOk := it.(env.Native) + var natValOk bool + var natVal fyne.StringValidator + if natOk { + natVal, natValOk = nat.Value.(fyne.StringValidator) + } + if natValOk { + (*iv) = natVal + } else { + var u func(string) error + switch fn := it.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("validation-all-strings: arg 1: " + "block item: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + u = func(farg0 string) error { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res error + switch v := ps.Res.(type) { + case env.String: + res = errors.New(v.Value) + case env.Error: + res = errors.New(v.Print(*ps.Idx)) + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "validation-all-strings: arg 1: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "validation-all-strings: arg 1: callback result: "+"expected error, string or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("validation-all-strings: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + u = nil + default: + ps.FailureFlag = true + return env.NewError("validation-all-strings: arg 1: " + "block item: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + (*iv) = fyne.StringValidator(u) + } + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("validation-all-strings: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("validation-all-strings: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := validation.NewAllStrings(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("validation-all-strings: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + resErr := (func(string) error)(res0)(arg0Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return nil + }, 1, false, false, "Returned func") + return res0Obj + }, + }, + // validation-regexp creates a new validator that uses regular expression parsing. + // The validator will return nil if valid, otherwise returns an error with a reason text. + // + // Since: 1.4 + // + // Args: + // * regexpstr - string + // * reason - string + // Result: + // * fn { string } -> Go(error) + "validation-regexp": { + Doc: "validation.NewRegexp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("validation-regexp: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("validation-regexp: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := validation.NewRegexp(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("validation-regexp: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + resErr := (func(string) error)(res0)(arg0Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return nil + }, 1, false, false, "Returned func") + return res0Obj + }, + }, + // validation-time creates a new validator that verifies times using time.Parse. + // The validator will return nil if valid, otherwise returns an error with a reason text. + // The reference time for the format: Mon Jan 2 15:04:05 -0700 MST 2006. + // See time.Parse() for more information about the reference time: https://pkg.go.dev/time#Parse + // + // Since: 2.1 + // + // Args: + // * format - string + // Result: + // * fn { string } -> Go(error) + "validation-time": { + Doc: "validation.NewTime", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("validation-time: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := validation.NewTime(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewBuiltin(func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("validation-time: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + resErr := (func(string) error)(res0)(arg0Val) + var resErrObj env.Object + if resErr != nil { + resErrObj = env.NewError(resErr.Error()) + } + if resErrObj != nil { + ps.FailureFlag = true + return resErrObj + } + return nil + }, 1, false, false, "Returned func") + return res0Obj + }, + }, + // Result: + // * integer + "adaptive": { + Doc: "Get widget.Adaptive value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(widget.Adaptive))) + return resObj + }, + }, + // Result: + // * integer + "button-align-center": { + Doc: "Get widget.ButtonAlignCenter value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(widget.ButtonAlignCenter))) + return resObj + }, + }, + // Result: + // * integer + "button-align-leading": { + Doc: "Get widget.ButtonAlignLeading value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(widget.ButtonAlignLeading))) + return resObj + }, + }, + // Result: + // * integer + "button-align-trailing": { + Doc: "Get widget.ButtonAlignTrailing value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(widget.ButtonAlignTrailing))) + return resObj + }, + }, + // Result: + // * integer + "button-icon-leading-text": { + Doc: "Get widget.ButtonIconLeadingText value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(widget.ButtonIconLeadingText))) + return resObj + }, + }, + // Result: + // * integer + "button-icon-trailing-text": { + Doc: "Get widget.ButtonIconTrailingText value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(widget.ButtonIconTrailingText))) + return resObj + }, + }, + // Result: + // * integer + "danger-importance": { + Doc: "Get widget.DangerImportance value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(widget.DangerImportance))) + return resObj + }, + }, + // Result: + // * integer + "high-importance": { + Doc: "Get widget.HighImportance value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(widget.HighImportance))) + return resObj + }, + }, + // Result: + // * integer + "horizontal": { + Doc: "Get widget.Horizontal value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(widget.Horizontal))) + return resObj + }, + }, + // Result: + // * integer + "low-importance": { + Doc: "Get widget.LowImportance value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(widget.LowImportance))) + return resObj + }, + }, + // Result: + // * integer + "medium-importance": { + Doc: "Get widget.MediumImportance value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(widget.MediumImportance))) + return resObj + }, + }, + // accordion creates a new accordion widget. + // + // Args: + // * items - block[Go(*widget.AccordionItem)] + // Result: + // * Go(*widget.Accordion) + "accordion": { + Doc: "widget.NewAccordion", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []*widget.AccordionItem + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]*widget.AccordionItem, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.AccordionItem); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("accordion: arg 1: " + "block item: " + "expected native of type *widget.AccordionItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("accordion: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("accordion: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("accordion: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("accordion: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewAccordion(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Accordion)") + return res0Obj + }, + }, + // accordion-item creates a new item for an Accordion. + // + // Args: + // * title - string + // * detail - Go(fyne.CanvasObject) + // Result: + // * Go(*widget.AccordionItem) + "accordion-item": { + Doc: "widget.NewAccordionItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("accordion-item: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("accordion-item: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("accordion-item: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("accordion-item: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("accordion-item: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewAccordionItem(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.AccordionItem)") + return res0Obj + }, + }, + // activity returns a widget for indicating activity + // + // Since: 2.5 + // + // Result: + // * Go(*widget.Activity) + "activity": { + Doc: "widget.NewActivity", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := widget.NewActivity() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Activity)") + return res0Obj + }, + }, + "base-widget": { + Doc: "Create a new widget.BaseWidget struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &widget.BaseWidget{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*widget.BaseWidget)") + return resObj + }, + }, + // button creates a new button widget with the set label and tap handler + // + // Args: + // * label - string + // * tapped - fn { } + // Result: + // * Go(*widget.Button) + "button": { + Doc: "widget.NewButton", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("button: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("button: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("button: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("button: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := widget.NewButton(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Button)") + return res0Obj + }, + }, + // button-with-icon creates a new button widget with the specified label, themed icon and tap handler + // + // Args: + // * label - string + // * icon - Go(fyne.Resource) + // * tapped - fn { } + // Result: + // * Go(*widget.Button) + "button-with-icon": { + Doc: "widget.NewButtonWithIcon", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("button-with-icon: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val fyne.Resource + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("button-with-icon: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("button-with-icon: arg 2: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("button-with-icon: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("button-with-icon: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val func() + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("button-with-icon: arg 3: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("button-with-icon: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("button-with-icon: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := widget.NewButtonWithIcon(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Button)") + return res0Obj + }, + }, + // card creates a new card widget with the specified title, subtitle and content (all optional). + // + // Since: 1.4 + // + // Args: + // * title - string + // * subtitle - string + // * content - Go(fyne.CanvasObject) + // Result: + // * Go(*widget.Card) + "card": { + Doc: "widget.NewCard", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("card: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val string + if vc, ok := arg1.(env.String); ok { + arg1Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("card: arg 2: " + "expected string, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val fyne.CanvasObject + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("card: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("card: arg 3: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("card: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("card: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewCard(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Card)") + return res0Obj + }, + }, + // check creates a new check widget with the set label and change handler + // + // Args: + // * label - string + // * changed - fn { bool } + // Result: + // * Go(*widget.Check) + "check": { + Doc: "widget.NewCheck", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("check: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val func(bool) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("check: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 bool) { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("check: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("check: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := widget.NewCheck(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Check)") + return res0Obj + }, + }, + // check-group creates a new check group widget with the set options and change handler + // + // Since: 2.1 + // + // Args: + // * options - block[string] + // * changed - fn { block[string] } + // Result: + // * Go(*widget.CheckGroup) + "check-group": { + Doc: "widget.NewCheckGroup", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []string + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("check-group: arg 1: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("check-group: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("check-group: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func([]string) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("check-group: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 []string) { + var farg0Val env.Object + { + items := make([]env.Object, len(farg0)) + for i, it := range farg0 { + items[i] = *env.NewString(it) + } + farg0Val = *env.NewBlock(*env.NewTSeries(items)) + } + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("check-group: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("check-group: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := widget.NewCheckGroup(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.CheckGroup)") + return res0Obj + }, + }, + // check-with-data returns a check widget connected with the specified data source. + // + // Since: 2.0 + // + // Args: + // * label - string + // * data - Go(binding.Bool) + // Result: + // * Go(*widget.Check) + "check-with-data": { + Doc: "widget.NewCheckWithData", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("check-with-data: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val binding.Bool + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_binding_Bool(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("check-with-data: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Bool); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("check-with-data: arg 2: " + "expected native of type binding.Bool, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("check-with-data: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("check-with-data: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewCheckWithData(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Check)") + return res0Obj + }, + }, + "custom-text-grid-style": { + Doc: "Create a new widget.CustomTextGridStyle struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &widget.CustomTextGridStyle{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*widget.CustomTextGridStyle)") + return resObj + }, + }, + "disableable-widget": { + Doc: "Create a new widget.DisableableWidget struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &widget.DisableableWidget{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*widget.DisableableWidget)") + return resObj + }, + }, + // entry creates a new single line entry widget. + // + // Result: + // * Go(*widget.Entry) + "entry": { + Doc: "widget.NewEntry", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := widget.NewEntry() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Entry)") + return res0Obj + }, + }, + // entry-with-data returns an Entry widget connected to the specified data source. + // + // Since: 2.0 + // + // Args: + // * data - Go(binding.String) + // Result: + // * Go(*widget.Entry) + "entry-with-data": { + Doc: "widget.NewEntryWithData", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.String + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("entry-with-data: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("entry-with-data: arg 1: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("entry-with-data: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("entry-with-data: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewEntryWithData(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Entry)") + return res0Obj + }, + }, + // widget-file-icon takes a filepath and creates an icon with an overlaid label using the detected mimetype and extension + // + // Since: 1.4 + // + // Args: + // * uri - Go(fyne.URI) + // Result: + // * Go(*widget.FileIcon) + "widget-file-icon": { + Doc: "widget.NewFileIcon", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.URI + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_URI(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("widget-file-icon: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.URI); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("widget-file-icon: arg 1: " + "expected native of type fyne.URI, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("widget-file-icon: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("widget-file-icon: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewFileIcon(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.FileIcon)") + return res0Obj + }, + }, + // form creates a new form widget with the specified rows of form items + // and (if any of them should be shown) a form controls row at the bottom + // + // Args: + // * items - block[Go(*widget.FormItem)] + // Result: + // * Go(*widget.Form) + "form": { + Doc: "widget.NewForm", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []*widget.FormItem + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]*widget.FormItem, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.Native: + if vc, ok := v.Value.(*widget.FormItem); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("form: arg 1: " + "block item: " + "expected native of type *widget.FormItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("form: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("form: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("form: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("form: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewForm(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Form)") + return res0Obj + }, + }, + // form-item creates a new form item with the specified label text and input widget + // + // Args: + // * text - string + // * widget - Go(fyne.CanvasObject) + // Result: + // * Go(*widget.FormItem) + "form-item": { + Doc: "widget.NewFormItem", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("form-item: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val fyne.CanvasObject + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("form-item: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("form-item: arg 2: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("form-item: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("form-item: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewFormItem(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.FormItem)") + return res0Obj + }, + }, + // widget-grid-wrap creates and returns a GridWrap widget for displaying items in + // a wrapping grid layout with scrolling and caching for performance. + // + // Since: 2.4 + // + // Args: + // * length - fn { } -> integer + // * create-item - fn { } -> Go(fyne.CanvasObject) + // * update-item - fn { integer Go(fyne.CanvasObject) } + // Result: + // * Go(*widget.GridWrap) + "widget-grid-wrap": { + Doc: "widget.NewGridWrap", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val func() int + switch fn := arg0.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("widget-grid-wrap: arg 1: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg0Val = func() int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "widget-grid-wrap: arg 1: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("widget-grid-wrap: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("widget-grid-wrap: arg 1: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg1Val func() fyne.CanvasObject + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("widget-grid-wrap: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "widget-grid-wrap: arg 2: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "widget-grid-wrap: arg 2: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "widget-grid-wrap: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "widget-grid-wrap: arg 2: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("widget-grid-wrap: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("widget-grid-wrap: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg2Val func(widget.GridWrapItemID, fyne.CanvasObject) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("widget-grid-wrap: arg 3: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 widget.GridWrapItemID, farg1 fyne.CanvasObject) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(int(farg0))) + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("widget-grid-wrap: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("widget-grid-wrap: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := widget.NewGridWrap(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.GridWrap)") + return res0Obj + }, + }, + // grid-wrap-with-data creates a new GridWrap widget that will display the contents of the provided data. + // + // Since: 2.4 + // + // Args: + // * data - Go(binding.DataList) + // * create-item - fn { } -> Go(fyne.CanvasObject) + // * update-item - fn { Go(binding.DataItem) Go(fyne.CanvasObject) } + // Result: + // * Go(*widget.GridWrap) + "grid-wrap-with-data": { + Doc: "widget.NewGridWrapWithData", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("grid-wrap-with-data: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("grid-wrap-with-data: arg 1: " + "expected native of type binding.DataList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("grid-wrap-with-data: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("grid-wrap-with-data: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func() fyne.CanvasObject + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("grid-wrap-with-data: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "grid-wrap-with-data: arg 2: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "grid-wrap-with-data: arg 2: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "grid-wrap-with-data: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "grid-wrap-with-data: arg 2: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("grid-wrap-with-data: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("grid-wrap-with-data: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg2Val func(binding.DataItem, fyne.CanvasObject) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("grid-wrap-with-data: arg 3: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 binding.DataItem, farg1 fyne.CanvasObject) { + var farg0Val, farg1Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataItem)") + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("grid-wrap-with-data: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("grid-wrap-with-data: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := widget.NewGridWrapWithData(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.GridWrap)") + return res0Obj + }, + }, + // hyperlink creates a new hyperlink widget with the set text content + // + // Args: + // * text - string + // * url - *Go(url.URL) + // Result: + // * Go(*widget.Hyperlink) + "hyperlink": { + Doc: "widget.NewHyperlink", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("hyperlink: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val *url.URL + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*url.URL); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("hyperlink: arg 2: " + "expected native of type *url.URL, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("hyperlink: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("hyperlink: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewHyperlink(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Hyperlink)") + return res0Obj + }, + }, + "hyperlink-segment": { + Doc: "Create a new widget.HyperlinkSegment struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &widget.HyperlinkSegment{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*widget.HyperlinkSegment)") + return resObj + }, + }, + // hyperlink-with-style creates a new hyperlink widget with the set text content + // + // Args: + // * text - string + // * url - *Go(url.URL) + // * alignment - integer + // * style - Go(fyne.TextStyle) + // Result: + // * Go(*widget.Hyperlink) + "hyperlink-with-style": { + Doc: "widget.NewHyperlinkWithStyle", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("hyperlink-with-style: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val *url.URL + switch v := arg1.(type) { + case env.Native: + if vc, ok := v.Value.(*url.URL); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("hyperlink-with-style: arg 2: " + "expected native of type *url.URL, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("hyperlink-with-style: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("hyperlink-with-style: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.TextAlign + { + nat, natOk := arg2.(env.Native) + var natValOk bool + var natVal fyne.TextAlign + if natOk { + natVal, natValOk = nat.Value.(fyne.TextAlign) + } + if natValOk { + arg2Val = natVal + } else { + var u int + if vc, ok := arg2.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("hyperlink-with-style: arg 3: " + "expected integer, but got " + objectDebugString(ps.Idx, arg2)) + } + arg2Val = fyne.TextAlign(u) + } + } + var arg3Val fyne.TextStyle + switch v := arg3.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + arg3Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("hyperlink-with-style: arg 4: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("hyperlink-with-style: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewHyperlinkWithStyle(arg0Val, arg1Val, arg2Val, arg3Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Hyperlink)") + return res0Obj + }, + }, + // widget-icon returns a new icon widget that displays a themed icon resource + // + // Args: + // * res - Go(fyne.Resource) + // Result: + // * Go(*widget.Icon) + "widget-icon": { + Doc: "widget.NewIcon", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Resource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("widget-icon: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("widget-icon: arg 1: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("widget-icon: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("widget-icon: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewIcon(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Icon)") + return res0Obj + }, + }, + "image-segment": { + Doc: "Create a new widget.ImageSegment struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &widget.ImageSegment{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*widget.ImageSegment)") + return resObj + }, + }, + // label creates a new label widget with the set text content + // + // Args: + // * text - string + // Result: + // * Go(*widget.Label) + "label": { + Doc: "widget.NewLabel", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("label: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := widget.NewLabel(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Label)") + return res0Obj + }, + }, + // label-with-data returns an Label widget connected to the specified data source. + // + // Since: 2.0 + // + // Args: + // * data - Go(binding.String) + // Result: + // * Go(*widget.Label) + "label-with-data": { + Doc: "widget.NewLabelWithData", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.String + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_String(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("label-with-data: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.String); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("label-with-data: arg 1: " + "expected native of type binding.String, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("label-with-data: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("label-with-data: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewLabelWithData(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Label)") + return res0Obj + }, + }, + // label-with-style creates a new label widget with the set text content + // + // Args: + // * text - string + // * alignment - integer + // * style - Go(fyne.TextStyle) + // Result: + // * Go(*widget.Label) + "label-with-style": { + Doc: "widget.NewLabelWithStyle", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("label-with-style: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val fyne.TextAlign + { + nat, natOk := arg1.(env.Native) + var natValOk bool + var natVal fyne.TextAlign + if natOk { + natVal, natValOk = nat.Value.(fyne.TextAlign) + } + if natValOk { + arg1Val = natVal + } else { + var u int + if vc, ok := arg1.(env.Integer); ok { + u = int(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("label-with-style: arg 2: " + "expected integer, but got " + objectDebugString(ps.Idx, arg1)) + } + arg1Val = fyne.TextAlign(u) + } + } + var arg2Val fyne.TextStyle + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.TextStyle); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("label-with-style: arg 3: " + "expected native of type *fyne.TextStyle, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("label-with-style: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewLabelWithStyle(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Label)") + return res0Obj + }, + }, + // list creates and returns a list widget for displaying items in + // a vertical layout with scrolling and caching for performance. + // + // Since: 1.4 + // + // Args: + // * length - fn { } -> integer + // * create-item - fn { } -> Go(fyne.CanvasObject) + // * update-item - fn { integer Go(fyne.CanvasObject) } + // Result: + // * Go(*widget.List) + "list": { + Doc: "widget.NewList", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val func() int + switch fn := arg0.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("list: arg 1: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg0Val = func() int { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res int + if vc, ok := ps.Res.(env.Integer); ok { + res = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "list: arg 1: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("list: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("list: arg 1: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg1Val func() fyne.CanvasObject + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("list: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "list: arg 2: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "list: arg 2: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "list: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "list: arg 2: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("list: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("list: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg2Val func(widget.ListItemID, fyne.CanvasObject) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("list: arg 3: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 widget.ListItemID, farg1 fyne.CanvasObject) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewInteger(int64(int(farg0))) + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("list: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("list: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := widget.NewList(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.List)") + return res0Obj + }, + }, + "list-segment": { + Doc: "Create a new widget.ListSegment struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &widget.ListSegment{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*widget.ListSegment)") + return resObj + }, + }, + // list-with-data creates a new list widget that will display the contents of the provided data. + // + // Since: 2.0 + // + // Args: + // * data - Go(binding.DataList) + // * create-item - fn { } -> Go(fyne.CanvasObject) + // * update-item - fn { Go(binding.DataItem) Go(fyne.CanvasObject) } + // Result: + // * Go(*widget.List) + "list-with-data": { + Doc: "widget.NewListWithData", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataList + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataList(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("list-with-data: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataList); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("list-with-data: arg 1: " + "expected native of type binding.DataList, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("list-with-data: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("list-with-data: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func() fyne.CanvasObject + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("list-with-data: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "list-with-data: arg 2: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "list-with-data: arg 2: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "list-with-data: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "list-with-data: arg 2: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("list-with-data: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("list-with-data: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg2Val func(binding.DataItem, fyne.CanvasObject) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("list-with-data: arg 3: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 binding.DataItem, farg1 fyne.CanvasObject) { + var farg0Val, farg1Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataItem)") + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("list-with-data: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("list-with-data: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := widget.NewListWithData(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.List)") + return res0Obj + }, + }, + // widget-menu creates a new Menu. + // + // Args: + // * menu - Go(*fyne.Menu) + // Result: + // * Go(*widget.Menu) + "widget-menu": { + Doc: "widget.NewMenu", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("widget-menu: arg 1: " + "expected native of type *fyne.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("widget-menu: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("widget-menu: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewMenu(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Menu)") + return res0Obj + }, + }, + // modal-pop-up creates a new popUp for the specified content and displays it on the passed canvas. + // A modal PopUp blocks interactions with underlying elements, covered with a semi-transparent overlay. + // + // Args: + // * content - Go(fyne.CanvasObject) + // * canvas - Go(fyne.Canvas) + // Result: + // * Go(*widget.PopUp) + "modal-pop-up": { + Doc: "widget.NewModalPopUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("modal-pop-up: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("modal-pop-up: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("modal-pop-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("modal-pop-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Canvas + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("modal-pop-up: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("modal-pop-up: arg 2: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("modal-pop-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("modal-pop-up: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewModalPopUp(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.PopUp)") + return res0Obj + }, + }, + // multi-line-entry creates a new entry that allows multiple lines + // + // Result: + // * Go(*widget.Entry) + "multi-line-entry": { + Doc: "widget.NewMultiLineEntry", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := widget.NewMultiLineEntry() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Entry)") + return res0Obj + }, + }, + "paragraph-segment": { + Doc: "Create a new widget.ParagraphSegment struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &widget.ParagraphSegment{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*widget.ParagraphSegment)") + return resObj + }, + }, + // password-entry creates a new entry password widget + // + // Result: + // * Go(*widget.Entry) + "password-entry": { + Doc: "widget.NewPasswordEntry", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := widget.NewPasswordEntry() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Entry)") + return res0Obj + }, + }, + // pop-up creates a new popUp for the specified content and displays it on the passed canvas. + // + // Args: + // * content - Go(fyne.CanvasObject) + // * canvas - Go(fyne.Canvas) + // Result: + // * Go(*widget.PopUp) + "pop-up": { + Doc: "widget.NewPopUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("pop-up: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("pop-up: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("pop-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("pop-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Canvas + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("pop-up: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("pop-up: arg 2: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("pop-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("pop-up: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewPopUp(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.PopUp)") + return res0Obj + }, + }, + // pop-up-menu creates a new, reusable popup menu. You can show it using ShowAtPosition. + // + // Since: 2.0 + // + // Args: + // * menu - Go(*fyne.Menu) + // * c - Go(fyne.Canvas) + // Result: + // * Go(*widget.PopUpMenu) + "pop-up-menu": { + Doc: "widget.NewPopUpMenu", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("pop-up-menu: arg 1: " + "expected native of type *fyne.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("pop-up-menu: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("pop-up-menu: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Canvas + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("pop-up-menu: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("pop-up-menu: arg 2: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("pop-up-menu: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("pop-up-menu: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewPopUpMenu(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.PopUpMenu)") + return res0Obj + }, + }, + // progress-bar creates a new progress bar widget. + // The default Min is 0 and Max is 1, Values set should be between those numbers. + // The display will convert this to a percentage. + // + // Result: + // * Go(*widget.ProgressBar) + "progress-bar": { + Doc: "widget.NewProgressBar", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := widget.NewProgressBar() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.ProgressBar)") + return res0Obj + }, + }, + // progress-bar-infinite creates a new progress bar widget that loops indefinitely from 0% -> 100% + // SetValue() is not defined for infinite progress bar + // To stop the looping progress and set the progress bar to 100%, call ProgressBarInfinite.Stop() + // + // Result: + // * Go(*widget.ProgressBarInfinite) + "progress-bar-infinite": { + Doc: "widget.NewProgressBarInfinite", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := widget.NewProgressBarInfinite() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.ProgressBarInfinite)") + return res0Obj + }, + }, + // progress-bar-with-data returns a progress bar connected with the specified data source. + // + // Since: 2.0 + // + // Args: + // * data - Go(binding.Float) + // Result: + // * Go(*widget.ProgressBar) + "progress-bar-with-data": { + Doc: "widget.NewProgressBarWithData", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.Float + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_Float(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("progress-bar-with-data: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Float); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("progress-bar-with-data: arg 1: " + "expected native of type binding.Float, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("progress-bar-with-data: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("progress-bar-with-data: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewProgressBarWithData(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.ProgressBar)") + return res0Obj + }, + }, + // radio-group creates a new radio group widget with the set options and change handler + // + // Since: 1.4 + // + // Args: + // * options - block[string] + // * changed - fn { string } + // Result: + // * Go(*widget.RadioGroup) + "radio-group": { + Doc: "widget.NewRadioGroup", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []string + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("radio-group: arg 1: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("radio-group: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("radio-group: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(string) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("radio-group: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("radio-group: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("radio-group: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := widget.NewRadioGroup(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.RadioGroup)") + return res0Obj + }, + }, + // rich-text returns a new RichText widget that renders the given text and segments. + // If no segments are specified it will be converted to a single segment using the default text settings. + // + // Since: 2.1 + // + // Args: + // * segments - block[Go(widget.RichTextSegment)] + // Result: + // * Go(*widget.RichText) + "rich-text": { + Doc: "widget.NewRichText", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []widget.RichTextSegment + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]widget.RichTextSegment, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_widget_RichTextSegment(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("rich-text: arg 1: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.RichTextSegment); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("rich-text: arg 1: " + "block item: " + "expected native of type widget.RichTextSegment, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("rich-text: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("rich-text: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("rich-text: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("rich-text: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewRichText(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.RichText)") + return res0Obj + }, + }, + // rich-text-from-markdown configures a RichText widget by parsing the provided markdown content. + // + // Since: 2.1 + // + // Args: + // * content - string + // Result: + // * Go(*widget.RichText) + "rich-text-from-markdown": { + Doc: "widget.NewRichTextFromMarkdown", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("rich-text-from-markdown: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := widget.NewRichTextFromMarkdown(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.RichText)") + return res0Obj + }, + }, + "rich-text-style": { + Doc: "Create a new widget.RichTextStyle struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &widget.RichTextStyle{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*widget.RichTextStyle)") + return resObj + }, + }, + // rich-text-with-text returns a new RichText widget that renders the given text. + // The string will be converted to a single text segment using the default text settings. + // + // Since: 2.1 + // + // Args: + // * text - string + // Result: + // * Go(*widget.RichText) + "rich-text-with-text": { + Doc: "widget.NewRichTextWithText", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("rich-text-with-text: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := widget.NewRichTextWithText(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.RichText)") + return res0Obj + }, + }, + // select creates a new select widget with the set list of options and changes handler + // + // Args: + // * options - block[string] + // * changed - fn { string } + // Result: + // * Go(*widget.Select) + "select": { + Doc: "widget.NewSelect", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []string + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("select: arg 1: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("select: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("select: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(string) + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("select: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 string) { + var farg0Val env.Object + farg0Val = *env.NewString(farg0) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("select: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("select: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := widget.NewSelect(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Select)") + return res0Obj + }, + }, + // select-entry creates a SelectEntry. + // + // Args: + // * options - block[string] + // Result: + // * Go(*widget.SelectEntry) + "select-entry": { + Doc: "widget.NewSelectEntry", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []string + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("select-entry: arg 1: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("select-entry: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("select-entry: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewSelectEntry(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.SelectEntry)") + return res0Obj + }, + }, + // separator creates a new separator. + // + // Since: 1.4 + // + // Result: + // * Go(*widget.Separator) + "separator": { + Doc: "widget.NewSeparator", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := widget.NewSeparator() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Separator)") + return res0Obj + }, + }, + "separator-segment": { + Doc: "Create a new widget.SeparatorSegment struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &widget.SeparatorSegment{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*widget.SeparatorSegment)") + return resObj + }, + }, + // simple-renderer creates a new SimpleRenderer to render a widget using a + // single fyne.CanvasObject. + // + // Since: 2.1 + // + // Args: + // * object - Go(fyne.CanvasObject) + // Result: + // * Go(fyne.WidgetRenderer) + "simple-renderer": { + Doc: "widget.NewSimpleRenderer", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("simple-renderer: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("simple-renderer: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("simple-renderer: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("simple-renderer: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewSimpleRenderer(arg0Val) + var res0Obj env.Object + res0Obj = ifaceToNative(ps.Idx, res0, "Go(fyne.WidgetRenderer)") + return res0Obj + }, + }, + // slider returns a basic slider. + // + // Args: + // * min - decimal + // * max - decimal + // Result: + // * Go(*widget.Slider) + "slider": { + Doc: "widget.NewSlider", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float64 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("slider: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val float64 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("slider: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + res0 := widget.NewSlider(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Slider)") + return res0Obj + }, + }, + // slider-with-data returns a slider connected with the specified data source. + // + // Since: 2.0 + // + // Args: + // * min - decimal + // * max - decimal + // * data - Go(binding.Float) + // Result: + // * Go(*widget.Slider) + "slider-with-data": { + Doc: "widget.NewSliderWithData", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val float64 + if vc, ok := arg0.(env.Decimal); ok { + arg0Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("slider-with-data: arg 1: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg0)) + } + var arg1Val float64 + if vc, ok := arg1.(env.Decimal); ok { + arg1Val = float64(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("slider-with-data: arg 2: " + "expected decimal, but got " + objectDebugString(ps.Idx, arg1)) + } + var arg2Val binding.Float + switch v := arg2.(type) { + case env.RyeCtx: + var err error + arg2Val, err = ctxTo_binding_Float(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("slider-with-data: arg 3: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.Float); ok { + arg2Val = vc + } else { + ps.FailureFlag = true + return env.NewError("slider-with-data: arg 3: " + "expected native of type binding.Float, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("slider-with-data: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("slider-with-data: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewSliderWithData(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Slider)") + return res0Obj + }, + }, + // table returns a new performant table widget defined by the passed functions. + // The first returns the data size in rows and columns, second parameter is a function that returns cell + // template objects that can be cached and the third is used to apply data at specified data location to the + // passed template CanvasObject. + // + // Since: 1.4 + // + // Args: + // * length - fn { } -> [ integer integer ] + // * create - fn { } -> Go(fyne.CanvasObject) + // * update - fn { Go(widget.TableCellID) Go(fyne.CanvasObject) } + // Result: + // * Go(*widget.Table) + "table": { + Doc: "widget.NewTable", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val func() (int, int) + switch fn := arg0.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("table: arg 1: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg0Val = func() (int, int) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 int + var res1 int + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table: arg 1: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table: arg 1: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table: arg 1: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[1].(env.Integer); ok { + res1 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table: arg 1: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("table: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("table: arg 1: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg1Val func() fyne.CanvasObject + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("table: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table: arg 2: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table: arg 2: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table: arg 2: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("table: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("table: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg2Val func(widget.TableCellID, fyne.CanvasObject) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("table: arg 3: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 widget.TableCellID, farg1 fyne.CanvasObject) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*widget.TableCellID)") + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("table: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("table: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := widget.NewTable(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Table)") + return res0Obj + }, + }, + "table-cell-id": { + Doc: "Create a new widget.TableCellID struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &widget.TableCellID{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*widget.TableCellID)") + return resObj + }, + }, + // table-with-headers returns a new performant table widget defined by the passed functions including sticky headers. + // The first returns the data size in rows and columns, second parameter is a function that returns cell + // template objects that can be cached and the third is used to apply data at specified data location to the + // passed template CanvasObject. + // The row and column headers will stick to the leading and top edges of the table and contain "1-10" and "A-Z" formatted labels. + // + // Since: 2.4 + // + // Args: + // * length - fn { } -> [ integer integer ] + // * create - fn { } -> Go(fyne.CanvasObject) + // * update - fn { Go(widget.TableCellID) Go(fyne.CanvasObject) } + // Result: + // * Go(*widget.Table) + "table-with-headers": { + Doc: "widget.NewTableWithHeaders", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val func() (int, int) + switch fn := arg0.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("table-with-headers: arg 1: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg0Val = func() (int, int) { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res0 int + var res1 int + res, ok := ps.Res.(env.Block) + if !ok { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table-with-headers: arg 1: callback result: "+"expected block for multiple return values, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if len(res.Series.S) != 2 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table-with-headers: arg 1: callback result: "+"expected block with 2 return values, but got "+strconv.Itoa(len(res.Series.S))+" return values", + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[0].(env.Integer); ok { + res0 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table-with-headers: arg 1: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[0]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + if vc, ok := res.Series.S[1].(env.Integer); ok { + res1 = int(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table-with-headers: arg 1: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, res.Series.S[1]), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res0, res1 + } + return res0, res1 + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("table-with-headers: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("table-with-headers: arg 1: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg1Val func() fyne.CanvasObject + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("table-with-headers: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() fyne.CanvasObject { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table-with-headers: arg 2: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table-with-headers: arg 2: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table-with-headers: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "table-with-headers: arg 2: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("table-with-headers: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("table-with-headers: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg2Val func(widget.TableCellID, fyne.CanvasObject) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 2 { + ps.FailureFlag = true + return env.NewError("table-with-headers: arg 3: " + "expected 2 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 widget.TableCellID, farg1 fyne.CanvasObject) { + var farg0Val, farg1Val env.Object + farg0Val = *env.NewNative(ps.Idx, &farg0, "Go(*widget.TableCellID)") + farg1Val = ifaceToNative(ps.Idx, farg1, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("table-with-headers: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("table-with-headers: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := widget.NewTableWithHeaders(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Table)") + return res0Obj + }, + }, + // text-grid creates a new empty TextGrid widget. + // + // Result: + // * Go(*widget.TextGrid) + "text-grid": { + Doc: "widget.NewTextGrid", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := widget.NewTextGrid() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.TextGrid)") + return res0Obj + }, + }, + "text-grid-cell": { + Doc: "Create a new widget.TextGridCell struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &widget.TextGridCell{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*widget.TextGridCell)") + return resObj + }, + }, + // text-grid-from-string creates a new TextGrid widget with the specified string content. + // + // Args: + // * content - string + // Result: + // * Go(*widget.TextGrid) + "text-grid-from-string": { + Doc: "widget.NewTextGridFromString", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val string + if vc, ok := arg0.(env.String); ok { + arg0Val = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("text-grid-from-string: arg 1: " + "expected string, but got " + objectDebugString(ps.Idx, arg0)) + } + res0 := widget.NewTextGridFromString(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.TextGrid)") + return res0Obj + }, + }, + "text-grid-row": { + Doc: "Create a new widget.TextGridRow struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &widget.TextGridRow{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*widget.TextGridRow)") + return resObj + }, + }, + "text-segment": { + Doc: "Create a new widget.TextSegment struct", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res := &widget.TextSegment{} + var resObj env.Object + resObj = *env.NewNative(ps.Idx, res, "Go(*widget.TextSegment)") + return resObj + }, + }, + // toolbar creates a new toolbar widget. + // + // Args: + // * items - block[Go(widget.ToolbarItem)] + // Result: + // * Go(*widget.Toolbar) + "toolbar": { + Doc: "widget.NewToolbar", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val []widget.ToolbarItem + switch v := arg0.(type) { + case env.Block: + arg0Val = make([]widget.ToolbarItem, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &arg0Val[i] + switch v := it.(type) { + case env.RyeCtx: + var err error + (*iv), err = ctxTo_widget_ToolbarItem(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("toolbar: arg 1: " + "block item: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(widget.ToolbarItem); ok { + (*iv) = vc + } else { + ps.FailureFlag = true + return env.NewError("toolbar: arg 1: " + "block item: " + "expected native of type widget.ToolbarItem, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("toolbar: arg 1: " + "block item: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + (*iv) = nil + default: + ps.FailureFlag = true + return env.NewError("toolbar: arg 1: " + "block item: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("toolbar: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("toolbar: arg 1: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewToolbar(arg0Val...) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Toolbar)") + return res0Obj + }, + }, + // toolbar-action returns a new push button style ToolbarItem + // + // Args: + // * icon - Go(fyne.Resource) + // * on-activated - fn { } + // Result: + // * Go(*widget.ToolbarAction) + "toolbar-action": { + Doc: "widget.NewToolbarAction", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.Resource + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_Resource(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("toolbar-action: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Resource); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("toolbar-action: arg 1: " + "expected native of type fyne.Resource, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("toolbar-action: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("toolbar-action: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func() + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 0 { + ps.FailureFlag = true + return env.NewError("toolbar-action: arg 2: " + "expected 0 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func() { + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("toolbar-action: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("toolbar-action: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := widget.NewToolbarAction(arg0Val, arg1Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.ToolbarAction)") + return res0Obj + }, + }, + // toolbar-separator returns a new separator item for a Toolbar to assist with ToolbarItem grouping + // + // Result: + // * Go(*widget.ToolbarSeparator) + "toolbar-separator": { + Doc: "widget.NewToolbarSeparator", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := widget.NewToolbarSeparator() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.ToolbarSeparator)") + return res0Obj + }, + }, + // toolbar-spacer returns a new spacer item for a Toolbar to assist with ToolbarItem alignment + // + // Result: + // * Go(*widget.ToolbarSpacer) + "toolbar-spacer": { + Doc: "widget.NewToolbarSpacer", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + res0 := widget.NewToolbarSpacer() + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.ToolbarSpacer)") + return res0Obj + }, + }, + // tree returns a new performant tree widget defined by the passed functions. + // childUIDs returns the child TreeNodeIDs of the given node. + // isBranch returns true if the given node is a branch, false if it is a leaf. + // create returns a new template object that can be cached. + // update is used to apply data at specified data location to the passed template CanvasObject. + // + // Since: 1.4 + // + // Args: + // * child-ui-ds - fn { string } -> block[string] + // * is-branch - fn { string } -> bool + // * create - fn { bool } -> Go(fyne.CanvasObject) + // * update - fn { string bool Go(fyne.CanvasObject) } + // Result: + // * Go(*widget.Tree) + "tree": { + Doc: "widget.NewTree", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val func(widget.TreeNodeID) []widget.TreeNodeID + switch fn := arg0.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("tree: arg 1: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg0Val = func(farg0 widget.TreeNodeID) []widget.TreeNodeID { + var farg0Val env.Object + farg0Val = *env.NewString(string(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res []widget.TreeNodeID + switch v := ps.Res.(type) { + case env.Block: + res = make([]widget.TreeNodeID, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &res[i] + { + nat, natOk := it.(env.Native) + var natValOk bool + var natVal widget.TreeNodeID + if natOk { + natVal, natValOk = nat.Value.(widget.TreeNodeID) + } + if natValOk { + (*iv) = natVal + } else { + var u string + if vc, ok := it.(env.String); ok { + u = string(vc.Value) + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "tree: arg 1: callback result: "+"block item: "+"expected string, but got "+objectDebugString(ps.Idx, it), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + (*iv) = widget.TreeNodeID(u) + } + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "tree: arg 1: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "tree: arg 1: callback result: "+"expected block or nil, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("tree: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("tree: arg 1: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg1Val func(widget.TreeNodeID) bool + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("tree: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 widget.TreeNodeID) bool { + var farg0Val env.Object + farg0Val = *env.NewString(string(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res bool + if vc, ok := ps.Res.(env.Integer); ok { + res = vc.Value != 0 + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "tree: arg 2: callback result: "+"expected integer, but got "+objectDebugString(ps.Idx, ps.Res), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("tree: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("tree: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg2Val func(bool) fyne.CanvasObject + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("tree: arg 3: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 bool) fyne.CanvasObject { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "tree: arg 3: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "tree: arg 3: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "tree: arg 3: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "tree: arg 3: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("tree: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("tree: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg3Val func(widget.TreeNodeID, bool, fyne.CanvasObject) + switch fn := arg3.(type) { + case env.Function: + if fn.Argsn != 3 { + ps.FailureFlag = true + return env.NewError("tree: arg 4: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg3Val = func(farg0 widget.TreeNodeID, farg1 bool, farg2 fyne.CanvasObject) { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = *env.NewString(string(farg0)) + farg1Val = *env.NewInteger(boolToInt64(farg1)) + farg2Val = ifaceToNative(ps.Idx, farg2, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("tree: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("tree: arg 4: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := widget.NewTree(arg0Val, arg1Val, arg2Val, arg3Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Tree)") + return res0Obj + }, + }, + // tree-with-data creates a new tree widget that will display the contents of the provided data. + // + // Since: 2.4 + // + // Args: + // * data - Go(binding.DataTree) + // * create-item - fn { bool } -> Go(fyne.CanvasObject) + // * update-item - fn { Go(binding.DataItem) bool Go(fyne.CanvasObject) } + // Result: + // * Go(*widget.Tree) + "tree-with-data": { + Doc: "widget.NewTreeWithData", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val binding.DataTree + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_binding_DataTree(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("tree-with-data: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(binding.DataTree); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("tree-with-data: arg 1: " + "expected native of type binding.DataTree, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("tree-with-data: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("tree-with-data: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val func(bool) fyne.CanvasObject + switch fn := arg1.(type) { + case env.Function: + if fn.Argsn != 1 { + ps.FailureFlag = true + return env.NewError("tree-with-data: arg 2: " + "expected 1 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg1Val = func(farg0 bool) fyne.CanvasObject { + var farg0Val env.Object + farg0Val = *env.NewInteger(boolToInt64(farg0)) + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val) + var res fyne.CanvasObject + switch v := ps.Res.(type) { + case env.RyeCtx: + var err error + res, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "tree-with-data: arg 2: callback result: "+err.Error(), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + res = vc + } else { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "tree-with-data: arg 2: callback result: "+"expected native of type fyne.CanvasObject, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "tree-with-data: arg 2: callback result: "+"expected integer to be 0 or nil, but got "+strconv.FormatInt(v.Value, 10), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + res = nil + default: + ps.FailureFlag = true + fmt.Printf("\033[31mError: \033[1m%v\033[m\n\033[31mFrom function \033[1m%v { %v }\033[m\n", + "tree-with-data: arg 2: callback result: "+"expected native, but got "+objectDebugString(ps.Idx, v), + actualFn.Spec.Series.PositionAndSurroundingElements(*ps.Idx), + actualFn.Body.Series.PositionAndSurroundingElements(*ps.Idx), + ) + return res + } + return res + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("tree-with-data: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("tree-with-data: arg 2: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + var arg2Val func(binding.DataItem, bool, fyne.CanvasObject) + switch fn := arg2.(type) { + case env.Function: + if fn.Argsn != 3 { + ps.FailureFlag = true + return env.NewError("tree-with-data: arg 3: " + "expected 3 function arguments, but got " + strconv.Itoa(fn.Argsn)) + } + arg2Val = func(farg0 binding.DataItem, farg1 bool, farg2 fyne.CanvasObject) { + var farg0Val, farg1Val, farg2Val env.Object + farg0Val = ifaceToNative(ps.Idx, farg0, "Go(binding.DataItem)") + farg1Val = *env.NewInteger(boolToInt64(farg1)) + farg2Val = ifaceToNative(ps.Idx, farg2, "Go(fyne.CanvasObject)") + actualFn := fn + _ = actualFn + evaldo.CallFunctionArgsN(fn, ps, nil, farg0Val, farg1Val, farg2Val) + } + case env.Integer: + if fn.Value != 0 { + ps.FailureFlag = true + return env.NewError("tree-with-data: arg 3: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(fn.Value, 10)) + } + arg2Val = nil + default: + ps.FailureFlag = true + return env.NewError("tree-with-data: arg 3: " + "expected function or nil, but got " + objectDebugString(ps.Idx, fn)) + } + res0 := widget.NewTreeWithData(arg0Val, arg1Val, arg2Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Tree)") + return res0Obj + }, + }, + // tree-with-strings creates a new tree with the given string map. + // Data must contain a mapping for the root, which defaults to empty string (""). + // + // Since: 1.4 + // + // Args: + // * data - dict[string, block[string]] + // Result: + // * Go(*widget.Tree) + "tree-with-strings": { + Doc: "widget.NewTreeWithStrings", + Argsn: 1, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val map[string][]string + switch v := arg0.(type) { + case env.Block: + if len(v.Series.S)%2 != 0 { + ps.FailureFlag = true + return env.NewError("tree-with-strings: arg 1: " + "expected block to have length of multiple of 2, but got block with length " + strconv.Itoa(len(v.Series.S))) + } + arg0Val = make(map[string][]string, len(v.Series.S)/2) + for i := 0; i < len(v.Series.S); i += 2 { + var mapK string + if vc, ok := v.Series.S[i+0].(env.String); ok { + mapK = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("tree-with-strings: arg 1: " + "map key: " + "expected string, but got " + objectDebugString(ps.Idx, v.Series.S[i+0])) + } + var mapV []string + switch v := v.Series.S[i+1].(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("tree-with-strings: arg 1: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("tree-with-strings: arg 1: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("tree-with-strings: arg 1: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val[mapK] = mapV + } + case env.Dict: + arg0Val = make(map[string][]string, len(v.Data)) + for dictK, dictV := range v.Data { + mapK := dictK + var mapV []string + switch v := dictV.(type) { + case env.Block: + mapV = make([]string, len(v.Series.S)) + for i, it := range v.Series.S { + iv := &mapV[i] + if vc, ok := it.(env.String); ok { + (*iv) = string(vc.Value) + } else { + ps.FailureFlag = true + return env.NewError("tree-with-strings: arg 1: " + "map value: " + "block item: " + "expected string, but got " + objectDebugString(ps.Idx, it)) + } + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("tree-with-strings: arg 1: " + "map value: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + mapV = nil + default: + ps.FailureFlag = true + return env.NewError("tree-with-strings: arg 1: " + "map value: " + "expected block or nil, but got " + objectDebugString(ps.Idx, v)) + } + arg0Val[mapK] = mapV + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("tree-with-strings: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("tree-with-strings: arg 1: " + "expected block, dict or nil, but got " + objectDebugString(ps.Idx, v)) + } + res0 := widget.NewTreeWithStrings(arg0Val) + var res0Obj env.Object + res0Obj = *env.NewNative(ps.Idx, res0, "Go(*widget.Tree)") + return res0Obj + }, + }, + // show-modal-pop-up creates a new popUp for the specified content and displays it on the passed canvas. + // A modal PopUp blocks interactions with underlying elements, covered with a semi-transparent overlay. + // + // Args: + // * content - Go(fyne.CanvasObject) + // * canvas - Go(fyne.Canvas) + "show-modal-pop-up": { + Doc: "widget.ShowModalPopUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("show-modal-pop-up: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("show-modal-pop-up: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("show-modal-pop-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("show-modal-pop-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Canvas + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("show-modal-pop-up: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("show-modal-pop-up: arg 2: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("show-modal-pop-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("show-modal-pop-up: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + widget.ShowModalPopUp(arg0Val, arg1Val) + return nil + }, + }, + // show-pop-up creates a new popUp for the specified content and displays it on the passed canvas. + // + // Args: + // * content - Go(fyne.CanvasObject) + // * canvas - Go(fyne.Canvas) + "show-pop-up": { + Doc: "widget.ShowPopUp", + Argsn: 2, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("show-pop-up: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("show-pop-up: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("show-pop-up: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Canvas + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("show-pop-up: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up: arg 2: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("show-pop-up: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("show-pop-up: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + widget.ShowPopUp(arg0Val, arg1Val) + return nil + }, + }, + // show-pop-up-at-position creates a new popUp for the specified content at the specified absolute position. + // It will then display the popup on the passed canvas. + // + // Args: + // * content - Go(fyne.CanvasObject) + // * canvas - Go(fyne.Canvas) + // * pos - Go(fyne.Position) + "show-pop-up-at-position": { + Doc: "widget.ShowPopUpAtPosition", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-position: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-position: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("show-pop-up-at-position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Canvas + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-position: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-position: arg 2: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-position: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("show-pop-up-at-position: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Position + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-position: arg 3: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("show-pop-up-at-position: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + widget.ShowPopUpAtPosition(arg0Val, arg1Val, arg2Val) + return nil + }, + }, + // show-pop-up-at-relative-position shows a new popUp for the specified content at the given position relative to stated object. + // It will then display the popup on the passed canvas. + // + // Since 2.4 + // + // Args: + // * content - Go(fyne.CanvasObject) + // * canvas - Go(fyne.Canvas) + // * rel - Go(fyne.Position) + // * to - Go(fyne.CanvasObject) + "show-pop-up-at-relative-position": { + Doc: "widget.ShowPopUpAtRelativePosition", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val fyne.CanvasObject + switch v := arg0.(type) { + case env.RyeCtx: + var err error + arg0Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-relative-position: arg 1: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-relative-position: arg 1: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-relative-position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("show-pop-up-at-relative-position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Canvas + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-relative-position: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-relative-position: arg 2: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-relative-position: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("show-pop-up-at-relative-position: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Position + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-relative-position: arg 3: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("show-pop-up-at-relative-position: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg3Val fyne.CanvasObject + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-relative-position: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-relative-position: arg 4: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("show-pop-up-at-relative-position: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("show-pop-up-at-relative-position: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + widget.ShowPopUpAtRelativePosition(arg0Val, arg1Val, arg2Val, arg3Val) + return nil + }, + }, + // show-pop-up-menu-at-position creates a PopUp menu populated with items from the passed menu structure. + // It will automatically be positioned at the provided location and shown as an overlay on the specified canvas. + // + // Args: + // * menu - Go(*fyne.Menu) + // * c - Go(fyne.Canvas) + // * pos - Go(fyne.Position) + "show-pop-up-menu-at-position": { + Doc: "widget.ShowPopUpMenuAtPosition", + Argsn: 3, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-position: arg 1: " + "expected native of type *fyne.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Canvas + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-position: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-position: arg 2: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-position: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-position: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Position + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-position: arg 3: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-position: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + widget.ShowPopUpMenuAtPosition(arg0Val, arg1Val, arg2Val) + return nil + }, + }, + // show-pop-up-menu-at-relative-position creates a PopUp menu populated with meny items from the passed menu structure. + // It will automatically be positioned at the given position relative to stated object and shown as an overlay on the specified canvas. + // + // Since 2.4 + // + // Args: + // * menu - Go(*fyne.Menu) + // * c - Go(fyne.Canvas) + // * rel - Go(fyne.Position) + // * to - Go(fyne.CanvasObject) + "show-pop-up-menu-at-relative-position": { + Doc: "widget.ShowPopUpMenuAtRelativePosition", + Argsn: 4, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var arg0Val *fyne.Menu + switch v := arg0.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Menu); ok { + arg0Val = vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-relative-position: arg 1: " + "expected native of type *fyne.Menu, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-relative-position: arg 1: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg0Val = nil + default: + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-relative-position: arg 1: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg1Val fyne.Canvas + switch v := arg1.(type) { + case env.RyeCtx: + var err error + arg1Val, err = ctxTo_fyne_Canvas(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-relative-position: arg 2: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.Canvas); ok { + arg1Val = vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-relative-position: arg 2: " + "expected native of type fyne.Canvas, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-relative-position: arg 2: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg1Val = nil + default: + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-relative-position: arg 2: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg2Val fyne.Position + switch v := arg2.(type) { + case env.Native: + if vc, ok := v.Value.(*fyne.Position); ok { + arg2Val = *vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-relative-position: arg 3: " + "expected native of type *fyne.Position, but got " + objectDebugString(ps.Idx, v)) + } + default: + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-relative-position: arg 3: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + var arg3Val fyne.CanvasObject + switch v := arg3.(type) { + case env.RyeCtx: + var err error + arg3Val, err = ctxTo_fyne_CanvasObject(ps, v) + if err != nil { + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-relative-position: arg 4: " + err.Error()) + } + case env.Native: + if vc, ok := v.Value.(fyne.CanvasObject); ok { + arg3Val = vc + } else { + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-relative-position: arg 4: " + "expected native of type fyne.CanvasObject, but got " + objectDebugString(ps.Idx, v)) + } + case env.Integer: + if v.Value != 0 { + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-relative-position: arg 4: " + "expected integer to be 0 or nil, but got " + strconv.FormatInt(v.Value, 10)) + } + arg3Val = nil + default: + ps.FailureFlag = true + return env.NewError("show-pop-up-menu-at-relative-position: arg 4: " + "expected native, but got " + objectDebugString(ps.Idx, v)) + } + widget.ShowPopUpMenuAtRelativePosition(arg0Val, arg1Val, arg2Val, arg3Val) + return nil + }, + }, + // Result: + // * integer + "success-importance": { + Doc: "Get widget.SuccessImportance value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(widget.SuccessImportance))) + return resObj + }, + }, + // Result: + // * Go(widget.TextGridStyle) + "text-grid-style-default": { + Doc: "Get widget.TextGridStyleDefault value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = ifaceToNative(ps.Idx, widget.TextGridStyleDefault, "Go(widget.TextGridStyle)") + return resObj + }, + }, + // Result: + // * Go(widget.TextGridStyle) + "text-grid-style-whitespace": { + Doc: "Get widget.TextGridStyleWhitespace value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = ifaceToNative(ps.Idx, widget.TextGridStyleWhitespace, "Go(widget.TextGridStyle)") + return resObj + }, + }, + // Result: + // * integer + "vertical": { + Doc: "Get widget.Vertical value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(widget.Vertical))) + return resObj + }, + }, + // Result: + // * integer + "warning-importance": { + Doc: "Get widget.WarningImportance value", + Argsn: 0, + Fn: func(ps *env.ProgramState, arg0, arg1, arg2, arg3, arg4 env.Object) env.Object { + var resObj env.Object + resObj = *env.NewInteger(int64(int(widget.WarningImportance))) + return resObj + }, + }, +} diff --git a/examples/buttons.rye b/examples/buttons.rye new file mode 100644 index 0000000..c034e00 --- /dev/null +++ b/examples/buttons.rye @@ -0,0 +1,68 @@ + +rye .needs { fyne } + +myctx: context { do load %buttons_my.rye } + +current-ctx: ?current + +do\par fyne { + + win: app .window "Buttons app" + gw: grid-wrap size 120.0 36.0 { } + spl: h-split gw lbl: label "" , + spl .offset! 0.6 + + for lc\data\ myctx { ::w + extends myctx { + fnc: ?w + gw .add button to-string w + fn\par { } current-ctx + { set-text lbl capture-stdout [ fnc ] } + } + } + + with win { + .resize size 450.0 350.0 , + .set-content spl , + .show-and-run + } +} + + + + + + + + + + + + + + + + +; if w .val .type? = 'function { +; fnc: ?w +; gw .add button to-string w +; fn\par { } current-ctx { set-text lbl capture-stdout [ fnc ] } +; } +; for lc\data\ myctx { ::w +; gw .add button to-string w fn\par { } myctx [ 'set-text 'lbl 'capture-stdout [ w ] ] +; } +; for lc\data\ myctx { ::w +; gw .add button to-string w closure { } { set-text lbl capture-stdout { do { probe w } } } +; } + +; for lc\vals\ myctx { ::f +; gw .add button to-string w does combine { set-text lbl capture-stdout apply ?f { } } ; where f are closures +; } + + + +; TODO: +; add apply built-in +; have lc\words lc\vals and ly\words\ lc\vals\ +; think about a concept of a stub a word or a value that caries it's context with it +; make evaluator evaluate function in ab xlock of code \ No newline at end of file diff --git a/examples/buttons_my.rye b/examples/buttons_my.rye new file mode 100644 index 0000000..f7cf5ca --- /dev/null +++ b/examples/buttons_my.rye @@ -0,0 +1,45 @@ + +hello: does { print "Hello world!" } + +my-ip: fn { } { + get https://api.ipify.org?format=json + |parse-json -> "ip" |print +} + +joke: does { + get https://official-joke-api.appspot.com/random_joke + |parse-json + |with { -> "setup" |print , -> "punchline" |print } +} + + + + + + + + + + + + + + + + + + + + + + + + + +; job: "Mining" + +; eat: fn { } { print "Jum..." } + +; work: fn { } { print "Ugh... " + job } + +; sleep: fn { } { print "Zzzz..." } diff --git a/fyne/bindings.txt b/fyne/bindings.txt index b22e464..b8a57e2 100644 --- a/fyne/bindings.txt +++ b/fyne/bindings.txt @@ -1,5 +1,9 @@ # This file contains a list of bindings, which can be enabled/disabled by placing them under the according section. # Re-run `go generate ./...` to update and sort the list. +# Renaming a binding: e.g. `some-func => my-some-func` or `Go(*X)//method => my-method` +# Bindings placed in the export section will be exposed as a public function in the generated file. + +[export] [enabled] Go(*app.SettingsSchema)//cloud-config! "Set *app.SettingsSchema CloudConfig value" @@ -140,6 +144,8 @@ Go(*canvas.Text)//text-style! "Set *canvas.Text TextS Go(*canvas.Text)//text-style? "Get *canvas.Text TextStyle value" Go(*canvas.Text)//text? "Get *canvas.Text Text value" Go(*container.AppTabs)//append "(*container.AppTabs).Append" +Go(*container.AppTabs)//base-widget! "Set *container.AppTabs BaseWidget value" +Go(*container.AppTabs)//base-widget? "Get *container.AppTabs BaseWidget value" Go(*container.AppTabs)//create-renderer "(*container.AppTabs).CreateRenderer" Go(*container.AppTabs)//current-tab "(*container.AppTabs).CurrentTab" Go(*container.AppTabs)//current-tab-index "(*container.AppTabs).CurrentTabIndex" @@ -148,18 +154,24 @@ Go(*container.AppTabs)//disable-item "(*container.AppTabs).D Go(*container.AppTabs)//enable-index "(*container.AppTabs).EnableIndex" Go(*container.AppTabs)//enable-item "(*container.AppTabs).EnableItem" Go(*container.AppTabs)//extend-base-widget "(*container.AppTabs).ExtendBaseWidget" +Go(*container.AppTabs)//hidden! "Set *container.AppTabs Hidden value" +Go(*container.AppTabs)//hidden? "Get *container.AppTabs Hidden value" Go(*container.AppTabs)//hide "(*container.AppTabs).Hide" Go(*container.AppTabs)//items! "Set *container.AppTabs Items value" Go(*container.AppTabs)//items? "Get *container.AppTabs Items value" Go(*container.AppTabs)//min-size "(*container.AppTabs).MinSize" +Go(*container.AppTabs)//move "(*container.AppTabs).Move" Go(*container.AppTabs)//on-changed! "Set *container.AppTabs OnChanged value" Go(*container.AppTabs)//on-changed? "Get *container.AppTabs OnChanged value" Go(*container.AppTabs)//on-selected! "Set *container.AppTabs OnSelected value" Go(*container.AppTabs)//on-selected? "Get *container.AppTabs OnSelected value" Go(*container.AppTabs)//on-unselected! "Set *container.AppTabs OnUnselected value" Go(*container.AppTabs)//on-unselected? "Get *container.AppTabs OnUnselected value" +Go(*container.AppTabs)//position "(*container.AppTabs).Position" +Go(*container.AppTabs)//refresh "(*container.AppTabs).Refresh" Go(*container.AppTabs)//remove "(*container.AppTabs).Remove" Go(*container.AppTabs)//remove-index "(*container.AppTabs).RemoveIndex" +Go(*container.AppTabs)//resize "(*container.AppTabs).Resize" Go(*container.AppTabs)//select "(*container.AppTabs).Select" Go(*container.AppTabs)//select-index "(*container.AppTabs).SelectIndex" Go(*container.AppTabs)//select-tab "(*container.AppTabs).SelectTab" @@ -169,7 +181,12 @@ Go(*container.AppTabs)//selected-index "(*container.AppTabs).S Go(*container.AppTabs)//set-items "(*container.AppTabs).SetItems" Go(*container.AppTabs)//set-tab-location "(*container.AppTabs).SetTabLocation" Go(*container.AppTabs)//show "(*container.AppTabs).Show" +Go(*container.AppTabs)//size "(*container.AppTabs).Size" +Go(*container.AppTabs)//theme "(*container.AppTabs).Theme" +Go(*container.AppTabs)//visible "(*container.AppTabs).Visible" Go(*container.DocTabs)//append "(*container.DocTabs).Append" +Go(*container.DocTabs)//base-widget! "Set *container.DocTabs BaseWidget value" +Go(*container.DocTabs)//base-widget? "Get *container.DocTabs BaseWidget value" Go(*container.DocTabs)//close-intercept! "Set *container.DocTabs CloseIntercept value" Go(*container.DocTabs)//close-intercept? "Get *container.DocTabs CloseIntercept value" Go(*container.DocTabs)//create-renderer "(*container.DocTabs).CreateRenderer" @@ -179,18 +196,25 @@ Go(*container.DocTabs)//disable-index "(*container.DocTabs).D Go(*container.DocTabs)//disable-item "(*container.DocTabs).DisableItem" Go(*container.DocTabs)//enable-index "(*container.DocTabs).EnableIndex" Go(*container.DocTabs)//enable-item "(*container.DocTabs).EnableItem" +Go(*container.DocTabs)//extend-base-widget "(*container.DocTabs).ExtendBaseWidget" +Go(*container.DocTabs)//hidden! "Set *container.DocTabs Hidden value" +Go(*container.DocTabs)//hidden? "Get *container.DocTabs Hidden value" Go(*container.DocTabs)//hide "(*container.DocTabs).Hide" Go(*container.DocTabs)//items! "Set *container.DocTabs Items value" Go(*container.DocTabs)//items? "Get *container.DocTabs Items value" Go(*container.DocTabs)//min-size "(*container.DocTabs).MinSize" +Go(*container.DocTabs)//move "(*container.DocTabs).Move" Go(*container.DocTabs)//on-closed! "Set *container.DocTabs OnClosed value" Go(*container.DocTabs)//on-closed? "Get *container.DocTabs OnClosed value" Go(*container.DocTabs)//on-selected! "Set *container.DocTabs OnSelected value" Go(*container.DocTabs)//on-selected? "Get *container.DocTabs OnSelected value" Go(*container.DocTabs)//on-unselected! "Set *container.DocTabs OnUnselected value" Go(*container.DocTabs)//on-unselected? "Get *container.DocTabs OnUnselected value" +Go(*container.DocTabs)//position "(*container.DocTabs).Position" +Go(*container.DocTabs)//refresh "(*container.DocTabs).Refresh" Go(*container.DocTabs)//remove "(*container.DocTabs).Remove" Go(*container.DocTabs)//remove-index "(*container.DocTabs).RemoveIndex" +Go(*container.DocTabs)//resize "(*container.DocTabs).Resize" Go(*container.DocTabs)//select "(*container.DocTabs).Select" Go(*container.DocTabs)//select-index "(*container.DocTabs).SelectIndex" Go(*container.DocTabs)//selected "(*container.DocTabs).Selected" @@ -198,12 +222,23 @@ Go(*container.DocTabs)//selected-index "(*container.DocTabs).S Go(*container.DocTabs)//set-items "(*container.DocTabs).SetItems" Go(*container.DocTabs)//set-tab-location "(*container.DocTabs).SetTabLocation" Go(*container.DocTabs)//show "(*container.DocTabs).Show" +Go(*container.DocTabs)//size "(*container.DocTabs).Size" +Go(*container.DocTabs)//theme "(*container.DocTabs).Theme" +Go(*container.DocTabs)//visible "(*container.DocTabs).Visible" +Go(*container.InnerWindow)//base-widget! "Set *container.InnerWindow BaseWidget value" +Go(*container.InnerWindow)//base-widget? "Get *container.InnerWindow BaseWidget value" Go(*container.InnerWindow)//close "(*container.InnerWindow).Close" Go(*container.InnerWindow)//close-intercept! "Set *container.InnerWindow CloseIntercept value" Go(*container.InnerWindow)//close-intercept? "Get *container.InnerWindow CloseIntercept value" Go(*container.InnerWindow)//create-renderer "(*container.InnerWindow).CreateRenderer" +Go(*container.InnerWindow)//extend-base-widget "(*container.InnerWindow).ExtendBaseWidget" +Go(*container.InnerWindow)//hidden! "Set *container.InnerWindow Hidden value" +Go(*container.InnerWindow)//hidden? "Get *container.InnerWindow Hidden value" +Go(*container.InnerWindow)//hide "(*container.InnerWindow).Hide" Go(*container.InnerWindow)//icon! "Set *container.InnerWindow Icon value" Go(*container.InnerWindow)//icon? "Get *container.InnerWindow Icon value" +Go(*container.InnerWindow)//min-size "(*container.InnerWindow).MinSize" +Go(*container.InnerWindow)//move "(*container.InnerWindow).Move" Go(*container.InnerWindow)//on-dragged! "Set *container.InnerWindow OnDragged value" Go(*container.InnerWindow)//on-dragged? "Get *container.InnerWindow OnDragged value" Go(*container.InnerWindow)//on-maximized! "Set *container.InnerWindow OnMaximized value" @@ -216,25 +251,60 @@ Go(*container.InnerWindow)//on-tapped-bar! "Set *container.InnerWi Go(*container.InnerWindow)//on-tapped-bar? "Get *container.InnerWindow OnTappedBar value" Go(*container.InnerWindow)//on-tapped-icon! "Set *container.InnerWindow OnTappedIcon value" Go(*container.InnerWindow)//on-tapped-icon? "Get *container.InnerWindow OnTappedIcon value" +Go(*container.InnerWindow)//position "(*container.InnerWindow).Position" +Go(*container.InnerWindow)//refresh "(*container.InnerWindow).Refresh" +Go(*container.InnerWindow)//resize "(*container.InnerWindow).Resize" Go(*container.InnerWindow)//set-content "(*container.InnerWindow).SetContent" Go(*container.InnerWindow)//set-padded "(*container.InnerWindow).SetPadded" Go(*container.InnerWindow)//set-title "(*container.InnerWindow).SetTitle" +Go(*container.InnerWindow)//show "(*container.InnerWindow).Show" +Go(*container.InnerWindow)//size "(*container.InnerWindow).Size" +Go(*container.InnerWindow)//theme "(*container.InnerWindow).Theme" +Go(*container.InnerWindow)//visible "(*container.InnerWindow).Visible" Go(*container.MultipleWindows)//add "(*container.MultipleWindows).Add" +Go(*container.MultipleWindows)//base-widget! "Set *container.MultipleWindows BaseWidget value" +Go(*container.MultipleWindows)//base-widget? "Get *container.MultipleWindows BaseWidget value" Go(*container.MultipleWindows)//create-renderer "(*container.MultipleWindows).CreateRenderer" +Go(*container.MultipleWindows)//extend-base-widget "(*container.MultipleWindows).ExtendBaseWidget" +Go(*container.MultipleWindows)//hidden! "Set *container.MultipleWindows Hidden value" +Go(*container.MultipleWindows)//hidden? "Get *container.MultipleWindows Hidden value" +Go(*container.MultipleWindows)//hide "(*container.MultipleWindows).Hide" +Go(*container.MultipleWindows)//min-size "(*container.MultipleWindows).MinSize" +Go(*container.MultipleWindows)//move "(*container.MultipleWindows).Move" +Go(*container.MultipleWindows)//position "(*container.MultipleWindows).Position" Go(*container.MultipleWindows)//refresh "(*container.MultipleWindows).Refresh" +Go(*container.MultipleWindows)//resize "(*container.MultipleWindows).Resize" +Go(*container.MultipleWindows)//show "(*container.MultipleWindows).Show" +Go(*container.MultipleWindows)//size "(*container.MultipleWindows).Size" +Go(*container.MultipleWindows)//theme "(*container.MultipleWindows).Theme" +Go(*container.MultipleWindows)//visible "(*container.MultipleWindows).Visible" Go(*container.MultipleWindows)//windows! "Set *container.MultipleWindows Windows value" Go(*container.MultipleWindows)//windows? "Get *container.MultipleWindows Windows value" +Go(*container.Split)//base-widget! "Set *container.Split BaseWidget value" +Go(*container.Split)//base-widget? "Get *container.Split BaseWidget value" Go(*container.Split)//create-renderer "(*container.Split).CreateRenderer" Go(*container.Split)//extend-base-widget "(*container.Split).ExtendBaseWidget" +Go(*container.Split)//hidden! "Set *container.Split Hidden value" +Go(*container.Split)//hidden? "Get *container.Split Hidden value" +Go(*container.Split)//hide "(*container.Split).Hide" Go(*container.Split)//horizontal! "Set *container.Split Horizontal value" Go(*container.Split)//horizontal? "Get *container.Split Horizontal value" Go(*container.Split)//leading! "Set *container.Split Leading value" Go(*container.Split)//leading? "Get *container.Split Leading value" +Go(*container.Split)//min-size "(*container.Split).MinSize" +Go(*container.Split)//move "(*container.Split).Move" Go(*container.Split)//offset! "Set *container.Split Offset value" Go(*container.Split)//offset? "Get *container.Split Offset value" +Go(*container.Split)//position "(*container.Split).Position" +Go(*container.Split)//refresh "(*container.Split).Refresh" +Go(*container.Split)//resize "(*container.Split).Resize" Go(*container.Split)//set-offset "(*container.Split).SetOffset" +Go(*container.Split)//show "(*container.Split).Show" +Go(*container.Split)//size "(*container.Split).Size" +Go(*container.Split)//theme "(*container.Split).Theme" Go(*container.Split)//trailing! "Set *container.Split Trailing value" Go(*container.Split)//trailing? "Get *container.Split Trailing value" +Go(*container.Split)//visible "(*container.Split).Visible" Go(*container.TabItem)//content! "Set *container.TabItem Content value" Go(*container.TabItem)//content? "Get *container.TabItem Content value" Go(*container.TabItem)//disabled "(*container.TabItem).Disabled" @@ -242,12 +312,25 @@ Go(*container.TabItem)//icon! "Set *container.TabItem Go(*container.TabItem)//icon? "Get *container.TabItem Icon value" Go(*container.TabItem)//text! "Set *container.TabItem Text value" Go(*container.TabItem)//text? "Get *container.TabItem Text value" +Go(*container.ThemeOverride)//base-widget! "Set *container.ThemeOverride BaseWidget value" +Go(*container.ThemeOverride)//base-widget? "Get *container.ThemeOverride BaseWidget value" Go(*container.ThemeOverride)//content! "Set *container.ThemeOverride Content value" Go(*container.ThemeOverride)//content? "Get *container.ThemeOverride Content value" Go(*container.ThemeOverride)//create-renderer "(*container.ThemeOverride).CreateRenderer" +Go(*container.ThemeOverride)//extend-base-widget "(*container.ThemeOverride).ExtendBaseWidget" +Go(*container.ThemeOverride)//hidden! "Set *container.ThemeOverride Hidden value" +Go(*container.ThemeOverride)//hidden? "Get *container.ThemeOverride Hidden value" +Go(*container.ThemeOverride)//hide "(*container.ThemeOverride).Hide" +Go(*container.ThemeOverride)//min-size "(*container.ThemeOverride).MinSize" +Go(*container.ThemeOverride)//move "(*container.ThemeOverride).Move" +Go(*container.ThemeOverride)//position "(*container.ThemeOverride).Position" Go(*container.ThemeOverride)//refresh "(*container.ThemeOverride).Refresh" +Go(*container.ThemeOverride)//resize "(*container.ThemeOverride).Resize" +Go(*container.ThemeOverride)//show "(*container.ThemeOverride).Show" +Go(*container.ThemeOverride)//size "(*container.ThemeOverride).Size" Go(*container.ThemeOverride)//theme! "Set *container.ThemeOverride Theme value" Go(*container.ThemeOverride)//theme? "Get *container.ThemeOverride Theme value" +Go(*container.ThemeOverride)//visible "(*container.ThemeOverride).Visible" Go(*desktop.CustomShortcut)//key "(*desktop.CustomShortcut).Key" Go(*desktop.CustomShortcut)//key-name! "Set *desktop.CustomShortcut KeyName value" Go(*desktop.CustomShortcut)//key-name? "Get *desktop.CustomShortcut KeyName value" @@ -261,6 +344,8 @@ Go(*desktop.MouseEvent)//button! "Set *desktop.MouseEven Go(*desktop.MouseEvent)//button? "Get *desktop.MouseEvent Button value" Go(*desktop.MouseEvent)//modifier! "Set *desktop.MouseEvent Modifier value" Go(*desktop.MouseEvent)//modifier? "Get *desktop.MouseEvent Modifier value" +Go(*desktop.MouseEvent)//point-event! "Set *desktop.MouseEvent PointEvent value" +Go(*desktop.MouseEvent)//point-event? "Get *desktop.MouseEvent PointEvent value" Go(*desktop.MouseEvent)//position! "Set *desktop.MouseEvent Position value" Go(*desktop.MouseEvent)//position? "Get *desktop.MouseEvent Position value" Go(*dialog.ColorPickerDialog)//advanced! "Set *dialog.ColorPickerDialog Advanced value" @@ -271,6 +356,8 @@ Go(*dialog.ColorPickerDialog)//show "(*dialog.ColorPickerDi Go(*dialog.ConfirmDialog)//set-confirm-importance "(*dialog.ConfirmDialog).SetConfirmImportance" Go(*dialog.ConfirmDialog)//set-confirm-text "(*dialog.ConfirmDialog).SetConfirmText" Go(*dialog.CustomDialog)//set-buttons "(*dialog.CustomDialog).SetButtons" +Go(*dialog.EntryDialog)//form-dialog! "Set *dialog.EntryDialog FormDialog value" +Go(*dialog.EntryDialog)//form-dialog? "Get *dialog.EntryDialog FormDialog value" Go(*dialog.EntryDialog)//set-on-closed "(*dialog.EntryDialog).SetOnClosed" Go(*dialog.EntryDialog)//set-placeholder "(*dialog.EntryDialog).SetPlaceholder" Go(*dialog.EntryDialog)//set-text "(*dialog.EntryDialog).SetText" @@ -335,14 +422,18 @@ Go(*fyne.Container)//resize "(*fyne.Container).Resi Go(*fyne.Container)//show "(*fyne.Container).Show" Go(*fyne.Container)//size "(*fyne.Container).Size" Go(*fyne.Container)//visible "(*fyne.Container).Visible" +Go(*fyne.Delta)//components "fyne.Delta.Components" Go(*fyne.Delta)//dx! "Set *fyne.Delta DX value" Go(*fyne.Delta)//dx? "Get *fyne.Delta DX value" Go(*fyne.Delta)//dy! "Set *fyne.Delta DY value" Go(*fyne.Delta)//dy? "Get *fyne.Delta DY value" +Go(*fyne.Delta)//is-zero "fyne.Delta.IsZero" Go(*fyne.DragEvent)//absolute-position! "Set *fyne.DragEvent AbsolutePosition value" Go(*fyne.DragEvent)//absolute-position? "Get *fyne.DragEvent AbsolutePosition value" Go(*fyne.DragEvent)//dragged! "Set *fyne.DragEvent Dragged value" Go(*fyne.DragEvent)//dragged? "Get *fyne.DragEvent Dragged value" +Go(*fyne.DragEvent)//point-event! "Set *fyne.DragEvent PointEvent value" +Go(*fyne.DragEvent)//point-event? "Get *fyne.DragEvent PointEvent value" Go(*fyne.DragEvent)//position! "Set *fyne.DragEvent Position value" Go(*fyne.DragEvent)//position? "Get *fyne.DragEvent Position value" Go(*fyne.HardwareKey)//scan-code! "Set *fyne.HardwareKey ScanCode value" @@ -385,12 +476,20 @@ Go(*fyne.PointEvent)//absolute-position! "Set *fyne.PointEvent A Go(*fyne.PointEvent)//absolute-position? "Get *fyne.PointEvent AbsolutePosition value" Go(*fyne.PointEvent)//position! "Set *fyne.PointEvent Position value" Go(*fyne.PointEvent)//position? "Get *fyne.PointEvent Position value" +Go(*fyne.Position)//add "fyne.Position.Add" +Go(*fyne.Position)//add-xy "fyne.Position.AddXY" +Go(*fyne.Position)//components "fyne.Position.Components" +Go(*fyne.Position)//is-zero "fyne.Position.IsZero" +Go(*fyne.Position)//subtract "fyne.Position.Subtract" +Go(*fyne.Position)//subtract-xy "fyne.Position.SubtractXY" Go(*fyne.Position)//x! "Set *fyne.Position X value" Go(*fyne.Position)//x? "Get *fyne.Position X value" Go(*fyne.Position)//y! "Set *fyne.Position Y value" Go(*fyne.Position)//y? "Get *fyne.Position Y value" Go(*fyne.ScrollEvent)//absolute-position! "Set *fyne.ScrollEvent AbsolutePosition value" Go(*fyne.ScrollEvent)//absolute-position? "Get *fyne.ScrollEvent AbsolutePosition value" +Go(*fyne.ScrollEvent)//point-event! "Set *fyne.ScrollEvent PointEvent value" +Go(*fyne.ScrollEvent)//point-event? "Get *fyne.ScrollEvent PointEvent value" Go(*fyne.ScrollEvent)//position! "Set *fyne.ScrollEvent Position value" Go(*fyne.ScrollEvent)//position? "Get *fyne.ScrollEvent Position value" Go(*fyne.ScrollEvent)//scrolled! "Set *fyne.ScrollEvent Scrolled value" @@ -422,8 +521,16 @@ Go(*fyne.ShortcutSelectAll)//shortcut-name "(*fyne.ShortcutSelectA Go(*fyne.ShortcutUndo)//key "(*fyne.ShortcutUndo).Key" Go(*fyne.ShortcutUndo)//mod "(*fyne.ShortcutUndo).Mod" Go(*fyne.ShortcutUndo)//shortcut-name "(*fyne.ShortcutUndo).ShortcutName" +Go(*fyne.Size)//add "fyne.Size.Add" +Go(*fyne.Size)//add-width-height "fyne.Size.AddWidthHeight" +Go(*fyne.Size)//components "fyne.Size.Components" Go(*fyne.Size)//height! "Set *fyne.Size Height value" Go(*fyne.Size)//height? "Get *fyne.Size Height value" +Go(*fyne.Size)//is-zero "fyne.Size.IsZero" +Go(*fyne.Size)//max "fyne.Size.Max" +Go(*fyne.Size)//min "fyne.Size.Min" +Go(*fyne.Size)//subtract "fyne.Size.Subtract" +Go(*fyne.Size)//subtract-width-height "fyne.Size.SubtractWidthHeight" Go(*fyne.Size)//width! "Set *fyne.Size Width value" Go(*fyne.Size)//width? "Get *fyne.Size Width value" Go(*fyne.StaticResource)//content "(*fyne.StaticResource).Content" @@ -451,6 +558,8 @@ Go(*fyne_driver.AndroidContext)//env! "Set *fyne_driver.Andro Go(*fyne_driver.AndroidContext)//env? "Get *fyne_driver.AndroidContext Env value" Go(*fyne_driver.AndroidContext)//vm! "Set *fyne_driver.AndroidContext VM value" Go(*fyne_driver.AndroidContext)//vm? "Get *fyne_driver.AndroidContext VM value" +Go(*fyne_driver.AndroidWindowContext)//android-context! "Set *fyne_driver.AndroidWindowContext AndroidContext value" +Go(*fyne_driver.AndroidWindowContext)//android-context? "Get *fyne_driver.AndroidWindowContext AndroidContext value" Go(*fyne_driver.AndroidWindowContext)//ctx! "Set *fyne_driver.AndroidWindowContext Ctx value" Go(*fyne_driver.AndroidWindowContext)//ctx? "Get *fyne_driver.AndroidWindowContext Ctx value" Go(*fyne_driver.AndroidWindowContext)//env! "Set *fyne_driver.AndroidWindowContext Env value" @@ -469,8 +578,10 @@ Go(*fyne_driver.X11WindowContext)//window-handle! "Set *fyne_driver.X11Wi Go(*fyne_driver.X11WindowContext)//window-handle? "Get *fyne_driver.X11WindowContext WindowHandle value" Go(*layout.CustomPaddedLayout)//bottom-padding! "Set *layout.CustomPaddedLayout BottomPadding value" Go(*layout.CustomPaddedLayout)//bottom-padding? "Get *layout.CustomPaddedLayout BottomPadding value" +Go(*layout.CustomPaddedLayout)//layout "layout.CustomPaddedLayout.Layout" Go(*layout.CustomPaddedLayout)//left-padding! "Set *layout.CustomPaddedLayout LeftPadding value" Go(*layout.CustomPaddedLayout)//left-padding? "Get *layout.CustomPaddedLayout LeftPadding value" +Go(*layout.CustomPaddedLayout)//min-size "layout.CustomPaddedLayout.MinSize" Go(*layout.CustomPaddedLayout)//right-padding! "Set *layout.CustomPaddedLayout RightPadding value" Go(*layout.CustomPaddedLayout)//right-padding? "Get *layout.CustomPaddedLayout RightPadding value" Go(*layout.CustomPaddedLayout)//top-padding! "Set *layout.CustomPaddedLayout TopPadding value" @@ -492,6 +603,8 @@ Go(*layout.Spacer)//size "(*layout.Spacer).Size" Go(*layout.Spacer)//visible "(*layout.Spacer).Visible" Go(*mobile.TouchEvent)//absolute-position! "Set *mobile.TouchEvent AbsolutePosition value" Go(*mobile.TouchEvent)//absolute-position? "Get *mobile.TouchEvent AbsolutePosition value" +Go(*mobile.TouchEvent)//point-event! "Set *mobile.TouchEvent PointEvent value" +Go(*mobile.TouchEvent)//point-event? "Get *mobile.TouchEvent PointEvent value" Go(*mobile.TouchEvent)//position! "Set *mobile.TouchEvent Position value" Go(*mobile.TouchEvent)//position? "Get *mobile.TouchEvent Position value" Go(*storage.ExtensionFileFilter)//extensions! "Set *storage.ExtensionFileFilter Extensions value" @@ -519,29 +632,59 @@ Go(*theme.ThemedResource)//error "(*theme.ThemedResource Go(*theme.ThemedResource)//name "(*theme.ThemedResource).Name" Go(*theme.ThemedResource)//theme-color-name "(*theme.ThemedResource).ThemeColorName" Go(*widget.Accordion)//append "(*widget.Accordion).Append" +Go(*widget.Accordion)//base-widget! "Set *widget.Accordion BaseWidget value" +Go(*widget.Accordion)//base-widget? "Get *widget.Accordion BaseWidget value" Go(*widget.Accordion)//close "(*widget.Accordion).Close" Go(*widget.Accordion)//close-all "(*widget.Accordion).CloseAll" Go(*widget.Accordion)//create-renderer "(*widget.Accordion).CreateRenderer" +Go(*widget.Accordion)//extend-base-widget "(*widget.Accordion).ExtendBaseWidget" +Go(*widget.Accordion)//hidden! "Set *widget.Accordion Hidden value" +Go(*widget.Accordion)//hidden? "Get *widget.Accordion Hidden value" +Go(*widget.Accordion)//hide "(*widget.Accordion).Hide" Go(*widget.Accordion)//items! "Set *widget.Accordion Items value" Go(*widget.Accordion)//items? "Get *widget.Accordion Items value" Go(*widget.Accordion)//min-size "(*widget.Accordion).MinSize" +Go(*widget.Accordion)//move "(*widget.Accordion).Move" Go(*widget.Accordion)//multi-open! "Set *widget.Accordion MultiOpen value" Go(*widget.Accordion)//multi-open? "Get *widget.Accordion MultiOpen value" Go(*widget.Accordion)//open "(*widget.Accordion).Open" Go(*widget.Accordion)//open-all "(*widget.Accordion).OpenAll" +Go(*widget.Accordion)//position "(*widget.Accordion).Position" +Go(*widget.Accordion)//refresh "(*widget.Accordion).Refresh" Go(*widget.Accordion)//remove "(*widget.Accordion).Remove" Go(*widget.Accordion)//remove-index "(*widget.Accordion).RemoveIndex" +Go(*widget.Accordion)//resize "(*widget.Accordion).Resize" +Go(*widget.Accordion)//show "(*widget.Accordion).Show" +Go(*widget.Accordion)//size "(*widget.Accordion).Size" +Go(*widget.Accordion)//theme "(*widget.Accordion).Theme" +Go(*widget.Accordion)//visible "(*widget.Accordion).Visible" Go(*widget.AccordionItem)//detail! "Set *widget.AccordionItem Detail value" Go(*widget.AccordionItem)//detail? "Get *widget.AccordionItem Detail value" Go(*widget.AccordionItem)//open! "Set *widget.AccordionItem Open value" Go(*widget.AccordionItem)//open? "Get *widget.AccordionItem Open value" Go(*widget.AccordionItem)//title! "Set *widget.AccordionItem Title value" Go(*widget.AccordionItem)//title? "Get *widget.AccordionItem Title value" +Go(*widget.Activity)//base-widget! "Set *widget.Activity BaseWidget value" +Go(*widget.Activity)//base-widget? "Get *widget.Activity BaseWidget value" Go(*widget.Activity)//create-renderer "(*widget.Activity).CreateRenderer" +Go(*widget.Activity)//extend-base-widget "(*widget.Activity).ExtendBaseWidget" +Go(*widget.Activity)//hidden! "Set *widget.Activity Hidden value" +Go(*widget.Activity)//hidden? "Get *widget.Activity Hidden value" +Go(*widget.Activity)//hide "(*widget.Activity).Hide" Go(*widget.Activity)//min-size "(*widget.Activity).MinSize" +Go(*widget.Activity)//move "(*widget.Activity).Move" +Go(*widget.Activity)//position "(*widget.Activity).Position" +Go(*widget.Activity)//refresh "(*widget.Activity).Refresh" +Go(*widget.Activity)//resize "(*widget.Activity).Resize" +Go(*widget.Activity)//show "(*widget.Activity).Show" +Go(*widget.Activity)//size "(*widget.Activity).Size" Go(*widget.Activity)//start "(*widget.Activity).Start" Go(*widget.Activity)//stop "(*widget.Activity).Stop" +Go(*widget.Activity)//theme "(*widget.Activity).Theme" +Go(*widget.Activity)//visible "(*widget.Activity).Visible" Go(*widget.BaseWidget)//extend-base-widget "(*widget.BaseWidget).ExtendBaseWidget" +Go(*widget.BaseWidget)//hidden! "Set *widget.BaseWidget Hidden value" +Go(*widget.BaseWidget)//hidden? "Get *widget.BaseWidget Hidden value" Go(*widget.BaseWidget)//hide "(*widget.BaseWidget).Hide" Go(*widget.BaseWidget)//min-size "(*widget.BaseWidget).MinSize" Go(*widget.BaseWidget)//move "(*widget.BaseWidget).Move" @@ -554,13 +697,21 @@ Go(*widget.BaseWidget)//theme "(*widget.BaseWidget).T Go(*widget.BaseWidget)//visible "(*widget.BaseWidget).Visible" Go(*widget.Button)//alignment! "Set *widget.Button Alignment value" Go(*widget.Button)//alignment? "Get *widget.Button Alignment value" +Go(*widget.Button)//base-widget! "Set *widget.Button BaseWidget value" +Go(*widget.Button)//base-widget? "Get *widget.Button BaseWidget value" Go(*widget.Button)//create-renderer "(*widget.Button).CreateRenderer" Go(*widget.Button)//cursor "(*widget.Button).Cursor" Go(*widget.Button)//disable "(*widget.Button).Disable" +Go(*widget.Button)//disableable-widget! "Set *widget.Button DisableableWidget value" +Go(*widget.Button)//disableable-widget? "Get *widget.Button DisableableWidget value" Go(*widget.Button)//disabled "(*widget.Button).Disabled" Go(*widget.Button)//enable "(*widget.Button).Enable" +Go(*widget.Button)//extend-base-widget "(*widget.Button).ExtendBaseWidget" Go(*widget.Button)//focus-gained "(*widget.Button).FocusGained" Go(*widget.Button)//focus-lost "(*widget.Button).FocusLost" +Go(*widget.Button)//hidden! "Set *widget.Button Hidden value" +Go(*widget.Button)//hidden? "Get *widget.Button Hidden value" +Go(*widget.Button)//hide "(*widget.Button).Hide" Go(*widget.Button)//icon! "Set *widget.Button Icon value" Go(*widget.Button)//icon-placement! "Set *widget.Button IconPlacement value" Go(*widget.Button)//icon-placement? "Get *widget.Button IconPlacement value" @@ -571,72 +722,124 @@ Go(*widget.Button)//min-size "(*widget.Button).MinSi Go(*widget.Button)//mouse-in "(*widget.Button).MouseIn" Go(*widget.Button)//mouse-moved "(*widget.Button).MouseMoved" Go(*widget.Button)//mouse-out "(*widget.Button).MouseOut" +Go(*widget.Button)//move "(*widget.Button).Move" Go(*widget.Button)//on-tapped! "Set *widget.Button OnTapped value" Go(*widget.Button)//on-tapped? "Get *widget.Button OnTapped value" +Go(*widget.Button)//position "(*widget.Button).Position" +Go(*widget.Button)//refresh "(*widget.Button).Refresh" +Go(*widget.Button)//resize "(*widget.Button).Resize" Go(*widget.Button)//set-icon "(*widget.Button).SetIcon" Go(*widget.Button)//set-text "(*widget.Button).SetText" +Go(*widget.Button)//show "(*widget.Button).Show" +Go(*widget.Button)//size "(*widget.Button).Size" Go(*widget.Button)//tapped "(*widget.Button).Tapped" Go(*widget.Button)//text! "Set *widget.Button Text value" Go(*widget.Button)//text? "Get *widget.Button Text value" +Go(*widget.Button)//theme "(*widget.Button).Theme" Go(*widget.Button)//typed-key "(*widget.Button).TypedKey" Go(*widget.Button)//typed-rune "(*widget.Button).TypedRune" +Go(*widget.Button)//visible "(*widget.Button).Visible" +Go(*widget.Card)//base-widget! "Set *widget.Card BaseWidget value" +Go(*widget.Card)//base-widget? "Get *widget.Card BaseWidget value" Go(*widget.Card)//content! "Set *widget.Card Content value" Go(*widget.Card)//content? "Get *widget.Card Content value" Go(*widget.Card)//create-renderer "(*widget.Card).CreateRenderer" +Go(*widget.Card)//extend-base-widget "(*widget.Card).ExtendBaseWidget" +Go(*widget.Card)//hidden! "Set *widget.Card Hidden value" +Go(*widget.Card)//hidden? "Get *widget.Card Hidden value" +Go(*widget.Card)//hide "(*widget.Card).Hide" Go(*widget.Card)//image! "Set *widget.Card Image value" Go(*widget.Card)//image? "Get *widget.Card Image value" Go(*widget.Card)//min-size "(*widget.Card).MinSize" +Go(*widget.Card)//move "(*widget.Card).Move" +Go(*widget.Card)//position "(*widget.Card).Position" +Go(*widget.Card)//refresh "(*widget.Card).Refresh" +Go(*widget.Card)//resize "(*widget.Card).Resize" Go(*widget.Card)//set-content "(*widget.Card).SetContent" Go(*widget.Card)//set-image "(*widget.Card).SetImage" Go(*widget.Card)//set-sub-title "(*widget.Card).SetSubTitle" Go(*widget.Card)//set-title "(*widget.Card).SetTitle" +Go(*widget.Card)//show "(*widget.Card).Show" +Go(*widget.Card)//size "(*widget.Card).Size" Go(*widget.Card)//subtitle! "Set *widget.Card Subtitle value" Go(*widget.Card)//subtitle? "Get *widget.Card Subtitle value" +Go(*widget.Card)//theme "(*widget.Card).Theme" Go(*widget.Card)//title! "Set *widget.Card Title value" Go(*widget.Card)//title? "Get *widget.Card Title value" +Go(*widget.Card)//visible "(*widget.Card).Visible" +Go(*widget.Check)//base-widget! "Set *widget.Check BaseWidget value" +Go(*widget.Check)//base-widget? "Get *widget.Check BaseWidget value" Go(*widget.Check)//bind "(*widget.Check).Bind" Go(*widget.Check)//checked! "Set *widget.Check Checked value" Go(*widget.Check)//checked? "Get *widget.Check Checked value" Go(*widget.Check)//create-renderer "(*widget.Check).CreateRenderer" Go(*widget.Check)//disable "(*widget.Check).Disable" +Go(*widget.Check)//disableable-widget! "Set *widget.Check DisableableWidget value" +Go(*widget.Check)//disableable-widget? "Get *widget.Check DisableableWidget value" Go(*widget.Check)//disabled "(*widget.Check).Disabled" Go(*widget.Check)//enable "(*widget.Check).Enable" +Go(*widget.Check)//extend-base-widget "(*widget.Check).ExtendBaseWidget" Go(*widget.Check)//focus-gained "(*widget.Check).FocusGained" Go(*widget.Check)//focus-lost "(*widget.Check).FocusLost" +Go(*widget.Check)//hidden! "Set *widget.Check Hidden value" +Go(*widget.Check)//hidden? "Get *widget.Check Hidden value" Go(*widget.Check)//hide "(*widget.Check).Hide" Go(*widget.Check)//min-size "(*widget.Check).MinSize" Go(*widget.Check)//mouse-in "(*widget.Check).MouseIn" Go(*widget.Check)//mouse-moved "(*widget.Check).MouseMoved" Go(*widget.Check)//mouse-out "(*widget.Check).MouseOut" +Go(*widget.Check)//move "(*widget.Check).Move" Go(*widget.Check)//on-changed! "Set *widget.Check OnChanged value" Go(*widget.Check)//on-changed? "Get *widget.Check OnChanged value" +Go(*widget.Check)//position "(*widget.Check).Position" +Go(*widget.Check)//refresh "(*widget.Check).Refresh" +Go(*widget.Check)//resize "(*widget.Check).Resize" Go(*widget.Check)//set-checked "(*widget.Check).SetChecked" Go(*widget.Check)//set-text "(*widget.Check).SetText" +Go(*widget.Check)//show "(*widget.Check).Show" +Go(*widget.Check)//size "(*widget.Check).Size" Go(*widget.Check)//tapped "(*widget.Check).Tapped" Go(*widget.Check)//text! "Set *widget.Check Text value" Go(*widget.Check)//text? "Get *widget.Check Text value" +Go(*widget.Check)//theme "(*widget.Check).Theme" Go(*widget.Check)//typed-key "(*widget.Check).TypedKey" Go(*widget.Check)//typed-rune "(*widget.Check).TypedRune" Go(*widget.Check)//unbind "(*widget.Check).Unbind" +Go(*widget.Check)//visible "(*widget.Check).Visible" Go(*widget.CheckGroup)//append "(*widget.CheckGroup).Append" +Go(*widget.CheckGroup)//base-widget! "Set *widget.CheckGroup BaseWidget value" +Go(*widget.CheckGroup)//base-widget? "Get *widget.CheckGroup BaseWidget value" Go(*widget.CheckGroup)//create-renderer "(*widget.CheckGroup).CreateRenderer" Go(*widget.CheckGroup)//disable "(*widget.CheckGroup).Disable" +Go(*widget.CheckGroup)//disableable-widget! "Set *widget.CheckGroup DisableableWidget value" +Go(*widget.CheckGroup)//disableable-widget? "Get *widget.CheckGroup DisableableWidget value" Go(*widget.CheckGroup)//disabled "(*widget.CheckGroup).Disabled" Go(*widget.CheckGroup)//enable "(*widget.CheckGroup).Enable" +Go(*widget.CheckGroup)//extend-base-widget "(*widget.CheckGroup).ExtendBaseWidget" +Go(*widget.CheckGroup)//hidden! "Set *widget.CheckGroup Hidden value" +Go(*widget.CheckGroup)//hidden? "Get *widget.CheckGroup Hidden value" +Go(*widget.CheckGroup)//hide "(*widget.CheckGroup).Hide" Go(*widget.CheckGroup)//horizontal! "Set *widget.CheckGroup Horizontal value" Go(*widget.CheckGroup)//horizontal? "Get *widget.CheckGroup Horizontal value" Go(*widget.CheckGroup)//min-size "(*widget.CheckGroup).MinSize" +Go(*widget.CheckGroup)//move "(*widget.CheckGroup).Move" Go(*widget.CheckGroup)//on-changed! "Set *widget.CheckGroup OnChanged value" Go(*widget.CheckGroup)//on-changed? "Get *widget.CheckGroup OnChanged value" Go(*widget.CheckGroup)//options! "Set *widget.CheckGroup Options value" Go(*widget.CheckGroup)//options? "Get *widget.CheckGroup Options value" +Go(*widget.CheckGroup)//position "(*widget.CheckGroup).Position" Go(*widget.CheckGroup)//refresh "(*widget.CheckGroup).Refresh" Go(*widget.CheckGroup)//remove "(*widget.CheckGroup).Remove" Go(*widget.CheckGroup)//required! "Set *widget.CheckGroup Required value" Go(*widget.CheckGroup)//required? "Get *widget.CheckGroup Required value" +Go(*widget.CheckGroup)//resize "(*widget.CheckGroup).Resize" Go(*widget.CheckGroup)//selected! "Set *widget.CheckGroup Selected value" Go(*widget.CheckGroup)//selected? "Get *widget.CheckGroup Selected value" Go(*widget.CheckGroup)//set-selected "(*widget.CheckGroup).SetSelected" +Go(*widget.CheckGroup)//show "(*widget.CheckGroup).Show" +Go(*widget.CheckGroup)//size "(*widget.CheckGroup).Size" +Go(*widget.CheckGroup)//theme "(*widget.CheckGroup).Theme" +Go(*widget.CheckGroup)//visible "(*widget.CheckGroup).Visible" Go(*widget.CustomTextGridStyle)//background-color "(*widget.CustomTextGridStyle).BackgroundColor" Go(*widget.CustomTextGridStyle)//bg-color! "Set *widget.CustomTextGridStyle BGColor value" Go(*widget.CustomTextGridStyle)//bg-color? "Get *widget.CustomTextGridStyle BGColor value" @@ -646,13 +849,30 @@ Go(*widget.CustomTextGridStyle)//style "(*widget.CustomTextGri Go(*widget.CustomTextGridStyle)//text-color "(*widget.CustomTextGridStyle).TextColor" Go(*widget.CustomTextGridStyle)//text-style! "Set *widget.CustomTextGridStyle TextStyle value" Go(*widget.CustomTextGridStyle)//text-style? "Get *widget.CustomTextGridStyle TextStyle value" +Go(*widget.DisableableWidget)//base-widget! "Set *widget.DisableableWidget BaseWidget value" +Go(*widget.DisableableWidget)//base-widget? "Get *widget.DisableableWidget BaseWidget value" Go(*widget.DisableableWidget)//disable "(*widget.DisableableWidget).Disable" Go(*widget.DisableableWidget)//disabled "(*widget.DisableableWidget).Disabled" Go(*widget.DisableableWidget)//enable "(*widget.DisableableWidget).Enable" +Go(*widget.DisableableWidget)//extend-base-widget "(*widget.DisableableWidget).ExtendBaseWidget" +Go(*widget.DisableableWidget)//hidden! "Set *widget.DisableableWidget Hidden value" +Go(*widget.DisableableWidget)//hidden? "Get *widget.DisableableWidget Hidden value" +Go(*widget.DisableableWidget)//hide "(*widget.DisableableWidget).Hide" +Go(*widget.DisableableWidget)//min-size "(*widget.DisableableWidget).MinSize" +Go(*widget.DisableableWidget)//move "(*widget.DisableableWidget).Move" +Go(*widget.DisableableWidget)//position "(*widget.DisableableWidget).Position" +Go(*widget.DisableableWidget)//refresh "(*widget.DisableableWidget).Refresh" +Go(*widget.DisableableWidget)//resize "(*widget.DisableableWidget).Resize" +Go(*widget.DisableableWidget)//show "(*widget.DisableableWidget).Show" +Go(*widget.DisableableWidget)//size "(*widget.DisableableWidget).Size" +Go(*widget.DisableableWidget)//theme "(*widget.DisableableWidget).Theme" +Go(*widget.DisableableWidget)//visible "(*widget.DisableableWidget).Visible" Go(*widget.Entry)//accepts-tab "(*widget.Entry).AcceptsTab" Go(*widget.Entry)//action-item! "Set *widget.Entry ActionItem value" Go(*widget.Entry)//action-item? "Get *widget.Entry ActionItem value" Go(*widget.Entry)//append "(*widget.Entry).Append" +Go(*widget.Entry)//base-widget! "Set *widget.Entry BaseWidget value" +Go(*widget.Entry)//base-widget? "Get *widget.Entry BaseWidget value" Go(*widget.Entry)//bind "(*widget.Entry).Bind" Go(*widget.Entry)//create-renderer "(*widget.Entry).CreateRenderer" Go(*widget.Entry)//cursor "(*widget.Entry).Cursor" @@ -661,6 +881,8 @@ Go(*widget.Entry)//cursor-column? "Get *widget.Entry Curs Go(*widget.Entry)//cursor-row! "Set *widget.Entry CursorRow value" Go(*widget.Entry)//cursor-row? "Get *widget.Entry CursorRow value" Go(*widget.Entry)//disable "(*widget.Entry).Disable" +Go(*widget.Entry)//disableable-widget! "Set *widget.Entry DisableableWidget value" +Go(*widget.Entry)//disableable-widget? "Get *widget.Entry DisableableWidget value" Go(*widget.Entry)//disabled "(*widget.Entry).Disabled" Go(*widget.Entry)//double-tapped "(*widget.Entry).DoubleTapped" Go(*widget.Entry)//drag-end "(*widget.Entry).DragEnd" @@ -669,6 +891,8 @@ Go(*widget.Entry)//enable "(*widget.Entry).Enable Go(*widget.Entry)//extend-base-widget "(*widget.Entry).ExtendBaseWidget" Go(*widget.Entry)//focus-gained "(*widget.Entry).FocusGained" Go(*widget.Entry)//focus-lost "(*widget.Entry).FocusLost" +Go(*widget.Entry)//hidden! "Set *widget.Entry Hidden value" +Go(*widget.Entry)//hidden? "Get *widget.Entry Hidden value" Go(*widget.Entry)//hide "(*widget.Entry).Hide" Go(*widget.Entry)//key-down "(*widget.Entry).KeyDown" Go(*widget.Entry)//key-up "(*widget.Entry).KeyUp" @@ -676,6 +900,7 @@ Go(*widget.Entry)//keyboard "(*widget.Entry).Keyboa Go(*widget.Entry)//min-size "(*widget.Entry).MinSize" Go(*widget.Entry)//mouse-down "(*widget.Entry).MouseDown" Go(*widget.Entry)//mouse-up "(*widget.Entry).MouseUp" +Go(*widget.Entry)//move "(*widget.Entry).Move" Go(*widget.Entry)//multi-line! "Set *widget.Entry MultiLine value" Go(*widget.Entry)//multi-line? "Get *widget.Entry MultiLine value" Go(*widget.Entry)//on-changed! "Set *widget.Entry OnChanged value" @@ -688,22 +913,25 @@ Go(*widget.Entry)//password! "Set *widget.Entry Pass Go(*widget.Entry)//password? "Get *widget.Entry Password value" Go(*widget.Entry)//place-holder! "Set *widget.Entry PlaceHolder value" Go(*widget.Entry)//place-holder? "Get *widget.Entry PlaceHolder value" +Go(*widget.Entry)//position "(*widget.Entry).Position" Go(*widget.Entry)//redo "(*widget.Entry).Redo" Go(*widget.Entry)//refresh "(*widget.Entry).Refresh" -Go(*widget.Entry)//scroll! "Set *widget.Entry Scroll value" -Go(*widget.Entry)//scroll? "Get *widget.Entry Scroll value" +Go(*widget.Entry)//resize "(*widget.Entry).Resize" Go(*widget.Entry)//selected-text "(*widget.Entry).SelectedText" Go(*widget.Entry)//set-min-rows-visible "(*widget.Entry).SetMinRowsVisible" Go(*widget.Entry)//set-on-validation-changed "(*widget.Entry).SetOnValidationChanged" Go(*widget.Entry)//set-place-holder "(*widget.Entry).SetPlaceHolder" Go(*widget.Entry)//set-text "(*widget.Entry).SetText" Go(*widget.Entry)//set-validation-error "(*widget.Entry).SetValidationError" +Go(*widget.Entry)//show "(*widget.Entry).Show" +Go(*widget.Entry)//size "(*widget.Entry).Size" Go(*widget.Entry)//tapped "(*widget.Entry).Tapped" Go(*widget.Entry)//tapped-secondary "(*widget.Entry).TappedSecondary" Go(*widget.Entry)//text! "Set *widget.Entry Text value" Go(*widget.Entry)//text-style! "Set *widget.Entry TextStyle value" Go(*widget.Entry)//text-style? "Get *widget.Entry TextStyle value" Go(*widget.Entry)//text? "Get *widget.Entry Text value" +Go(*widget.Entry)//theme "(*widget.Entry).Theme" Go(*widget.Entry)//touch-cancel "(*widget.Entry).TouchCancel" Go(*widget.Entry)//touch-down "(*widget.Entry).TouchDown" Go(*widget.Entry)//touch-up "(*widget.Entry).TouchUp" @@ -715,58 +943,95 @@ Go(*widget.Entry)//undo "(*widget.Entry).Undo" Go(*widget.Entry)//validate "(*widget.Entry).Validate" Go(*widget.Entry)//validator! "Set *widget.Entry Validator value" Go(*widget.Entry)//validator? "Get *widget.Entry Validator value" +Go(*widget.Entry)//visible "(*widget.Entry).Visible" Go(*widget.Entry)//wrapping! "Set *widget.Entry Wrapping value" Go(*widget.Entry)//wrapping? "Get *widget.Entry Wrapping value" +Go(*widget.FileIcon)//base-widget! "Set *widget.FileIcon BaseWidget value" +Go(*widget.FileIcon)//base-widget? "Get *widget.FileIcon BaseWidget value" Go(*widget.FileIcon)//create-renderer "(*widget.FileIcon).CreateRenderer" +Go(*widget.FileIcon)//extend-base-widget "(*widget.FileIcon).ExtendBaseWidget" +Go(*widget.FileIcon)//hidden! "Set *widget.FileIcon Hidden value" +Go(*widget.FileIcon)//hidden? "Get *widget.FileIcon Hidden value" +Go(*widget.FileIcon)//hide "(*widget.FileIcon).Hide" Go(*widget.FileIcon)//min-size "(*widget.FileIcon).MinSize" +Go(*widget.FileIcon)//move "(*widget.FileIcon).Move" +Go(*widget.FileIcon)//position "(*widget.FileIcon).Position" +Go(*widget.FileIcon)//refresh "(*widget.FileIcon).Refresh" +Go(*widget.FileIcon)//resize "(*widget.FileIcon).Resize" Go(*widget.FileIcon)//selected! "Set *widget.FileIcon Selected value" Go(*widget.FileIcon)//selected? "Get *widget.FileIcon Selected value" Go(*widget.FileIcon)//set-selected "(*widget.FileIcon).SetSelected" Go(*widget.FileIcon)//set-uri "(*widget.FileIcon).SetURI" +Go(*widget.FileIcon)//show "(*widget.FileIcon).Show" +Go(*widget.FileIcon)//size "(*widget.FileIcon).Size" +Go(*widget.FileIcon)//theme "(*widget.FileIcon).Theme" Go(*widget.FileIcon)//uri! "Set *widget.FileIcon URI value" Go(*widget.FileIcon)//uri? "Get *widget.FileIcon URI value" +Go(*widget.FileIcon)//visible "(*widget.FileIcon).Visible" Go(*widget.Form)//append "(*widget.Form).Append" Go(*widget.Form)//append-item "(*widget.Form).AppendItem" +Go(*widget.Form)//base-widget! "Set *widget.Form BaseWidget value" +Go(*widget.Form)//base-widget? "Get *widget.Form BaseWidget value" Go(*widget.Form)//cancel-text! "Set *widget.Form CancelText value" Go(*widget.Form)//cancel-text? "Get *widget.Form CancelText value" Go(*widget.Form)//create-renderer "(*widget.Form).CreateRenderer" Go(*widget.Form)//disable "(*widget.Form).Disable" Go(*widget.Form)//disabled "(*widget.Form).Disabled" Go(*widget.Form)//enable "(*widget.Form).Enable" +Go(*widget.Form)//extend-base-widget "(*widget.Form).ExtendBaseWidget" +Go(*widget.Form)//hidden! "Set *widget.Form Hidden value" +Go(*widget.Form)//hidden? "Get *widget.Form Hidden value" +Go(*widget.Form)//hide "(*widget.Form).Hide" Go(*widget.Form)//items! "Set *widget.Form Items value" Go(*widget.Form)//items? "Get *widget.Form Items value" Go(*widget.Form)//min-size "(*widget.Form).MinSize" +Go(*widget.Form)//move "(*widget.Form).Move" Go(*widget.Form)//on-cancel! "Set *widget.Form OnCancel value" Go(*widget.Form)//on-cancel? "Get *widget.Form OnCancel value" Go(*widget.Form)//on-submit! "Set *widget.Form OnSubmit value" Go(*widget.Form)//on-submit? "Get *widget.Form OnSubmit value" Go(*widget.Form)//orientation! "Set *widget.Form Orientation value" Go(*widget.Form)//orientation? "Get *widget.Form Orientation value" +Go(*widget.Form)//position "(*widget.Form).Position" Go(*widget.Form)//refresh "(*widget.Form).Refresh" +Go(*widget.Form)//resize "(*widget.Form).Resize" Go(*widget.Form)//set-on-validation-changed "(*widget.Form).SetOnValidationChanged" +Go(*widget.Form)//show "(*widget.Form).Show" +Go(*widget.Form)//size "(*widget.Form).Size" Go(*widget.Form)//submit-text! "Set *widget.Form SubmitText value" Go(*widget.Form)//submit-text? "Get *widget.Form SubmitText value" +Go(*widget.Form)//theme "(*widget.Form).Theme" Go(*widget.Form)//validate "(*widget.Form).Validate" +Go(*widget.Form)//visible "(*widget.Form).Visible" Go(*widget.FormItem)//hint-text! "Set *widget.FormItem HintText value" Go(*widget.FormItem)//hint-text? "Get *widget.FormItem HintText value" Go(*widget.FormItem)//text! "Set *widget.FormItem Text value" Go(*widget.FormItem)//text? "Get *widget.FormItem Text value" Go(*widget.FormItem)//widget! "Set *widget.FormItem Widget value" Go(*widget.FormItem)//widget? "Get *widget.FormItem Widget value" +Go(*widget.GridWrap)//base-widget! "Set *widget.GridWrap BaseWidget value" +Go(*widget.GridWrap)//base-widget? "Get *widget.GridWrap BaseWidget value" Go(*widget.GridWrap)//column-count "(*widget.GridWrap).ColumnCount" Go(*widget.GridWrap)//create-item! "Set *widget.GridWrap CreateItem value" Go(*widget.GridWrap)//create-item? "Get *widget.GridWrap CreateItem value" Go(*widget.GridWrap)//create-renderer "(*widget.GridWrap).CreateRenderer" +Go(*widget.GridWrap)//extend-base-widget "(*widget.GridWrap).ExtendBaseWidget" Go(*widget.GridWrap)//focus-gained "(*widget.GridWrap).FocusGained" Go(*widget.GridWrap)//focus-lost "(*widget.GridWrap).FocusLost" Go(*widget.GridWrap)//get-scroll-offset "(*widget.GridWrap).GetScrollOffset" +Go(*widget.GridWrap)//hidden! "Set *widget.GridWrap Hidden value" +Go(*widget.GridWrap)//hidden? "Get *widget.GridWrap Hidden value" +Go(*widget.GridWrap)//hide "(*widget.GridWrap).Hide" Go(*widget.GridWrap)//length! "Set *widget.GridWrap Length value" Go(*widget.GridWrap)//length? "Get *widget.GridWrap Length value" Go(*widget.GridWrap)//min-size "(*widget.GridWrap).MinSize" +Go(*widget.GridWrap)//move "(*widget.GridWrap).Move" Go(*widget.GridWrap)//on-selected! "Set *widget.GridWrap OnSelected value" Go(*widget.GridWrap)//on-selected? "Get *widget.GridWrap OnSelected value" Go(*widget.GridWrap)//on-unselected! "Set *widget.GridWrap OnUnselected value" Go(*widget.GridWrap)//on-unselected? "Get *widget.GridWrap OnUnselected value" +Go(*widget.GridWrap)//position "(*widget.GridWrap).Position" +Go(*widget.GridWrap)//refresh "(*widget.GridWrap).Refresh" Go(*widget.GridWrap)//refresh-item "(*widget.GridWrap).RefreshItem" Go(*widget.GridWrap)//resize "(*widget.GridWrap).Resize" Go(*widget.GridWrap)//scroll-to "(*widget.GridWrap).ScrollTo" @@ -774,29 +1039,43 @@ Go(*widget.GridWrap)//scroll-to-bottom "(*widget.GridWrap).Scr Go(*widget.GridWrap)//scroll-to-offset "(*widget.GridWrap).ScrollToOffset" Go(*widget.GridWrap)//scroll-to-top "(*widget.GridWrap).ScrollToTop" Go(*widget.GridWrap)//select "(*widget.GridWrap).Select" +Go(*widget.GridWrap)//show "(*widget.GridWrap).Show" +Go(*widget.GridWrap)//size "(*widget.GridWrap).Size" +Go(*widget.GridWrap)//theme "(*widget.GridWrap).Theme" Go(*widget.GridWrap)//typed-key "(*widget.GridWrap).TypedKey" Go(*widget.GridWrap)//typed-rune "(*widget.GridWrap).TypedRune" Go(*widget.GridWrap)//unselect "(*widget.GridWrap).Unselect" Go(*widget.GridWrap)//unselect-all "(*widget.GridWrap).UnselectAll" Go(*widget.GridWrap)//update-item! "Set *widget.GridWrap UpdateItem value" Go(*widget.GridWrap)//update-item? "Get *widget.GridWrap UpdateItem value" +Go(*widget.GridWrap)//visible "(*widget.GridWrap).Visible" Go(*widget.Hyperlink)//alignment! "Set *widget.Hyperlink Alignment value" Go(*widget.Hyperlink)//alignment? "Get *widget.Hyperlink Alignment value" +Go(*widget.Hyperlink)//base-widget! "Set *widget.Hyperlink BaseWidget value" +Go(*widget.Hyperlink)//base-widget? "Get *widget.Hyperlink BaseWidget value" Go(*widget.Hyperlink)//create-renderer "(*widget.Hyperlink).CreateRenderer" Go(*widget.Hyperlink)//cursor "(*widget.Hyperlink).Cursor" +Go(*widget.Hyperlink)//extend-base-widget "(*widget.Hyperlink).ExtendBaseWidget" Go(*widget.Hyperlink)//focus-gained "(*widget.Hyperlink).FocusGained" Go(*widget.Hyperlink)//focus-lost "(*widget.Hyperlink).FocusLost" +Go(*widget.Hyperlink)//hidden! "Set *widget.Hyperlink Hidden value" +Go(*widget.Hyperlink)//hidden? "Get *widget.Hyperlink Hidden value" +Go(*widget.Hyperlink)//hide "(*widget.Hyperlink).Hide" Go(*widget.Hyperlink)//min-size "(*widget.Hyperlink).MinSize" Go(*widget.Hyperlink)//mouse-in "(*widget.Hyperlink).MouseIn" Go(*widget.Hyperlink)//mouse-moved "(*widget.Hyperlink).MouseMoved" Go(*widget.Hyperlink)//mouse-out "(*widget.Hyperlink).MouseOut" +Go(*widget.Hyperlink)//move "(*widget.Hyperlink).Move" Go(*widget.Hyperlink)//on-tapped! "Set *widget.Hyperlink OnTapped value" Go(*widget.Hyperlink)//on-tapped? "Get *widget.Hyperlink OnTapped value" +Go(*widget.Hyperlink)//position "(*widget.Hyperlink).Position" Go(*widget.Hyperlink)//refresh "(*widget.Hyperlink).Refresh" Go(*widget.Hyperlink)//resize "(*widget.Hyperlink).Resize" Go(*widget.Hyperlink)//set-text "(*widget.Hyperlink).SetText" Go(*widget.Hyperlink)//set-url "(*widget.Hyperlink).SetURL" Go(*widget.Hyperlink)//set-url-from-string "(*widget.Hyperlink).SetURLFromString" +Go(*widget.Hyperlink)//show "(*widget.Hyperlink).Show" +Go(*widget.Hyperlink)//size "(*widget.Hyperlink).Size" Go(*widget.Hyperlink)//size-name! "Set *widget.Hyperlink SizeName value" Go(*widget.Hyperlink)//size-name? "Get *widget.Hyperlink SizeName value" Go(*widget.Hyperlink)//tapped "(*widget.Hyperlink).Tapped" @@ -804,12 +1083,14 @@ Go(*widget.Hyperlink)//text! "Set *widget.Hyperlink Go(*widget.Hyperlink)//text-style! "Set *widget.Hyperlink TextStyle value" Go(*widget.Hyperlink)//text-style? "Get *widget.Hyperlink TextStyle value" Go(*widget.Hyperlink)//text? "Get *widget.Hyperlink Text value" +Go(*widget.Hyperlink)//theme "(*widget.Hyperlink).Theme" Go(*widget.Hyperlink)//truncation! "Set *widget.Hyperlink Truncation value" Go(*widget.Hyperlink)//truncation? "Get *widget.Hyperlink Truncation value" Go(*widget.Hyperlink)//typed-key "(*widget.Hyperlink).TypedKey" Go(*widget.Hyperlink)//typed-rune "(*widget.Hyperlink).TypedRune" Go(*widget.Hyperlink)//url! "Set *widget.Hyperlink URL value" Go(*widget.Hyperlink)//url? "Get *widget.Hyperlink URL value" +Go(*widget.Hyperlink)//visible "(*widget.Hyperlink).Visible" Go(*widget.Hyperlink)//wrapping! "Set *widget.Hyperlink Wrapping value" Go(*widget.Hyperlink)//wrapping? "Get *widget.Hyperlink Wrapping value" Go(*widget.HyperlinkSegment)//alignment! "Set *widget.HyperlinkSegment Alignment value" @@ -827,11 +1108,25 @@ Go(*widget.HyperlinkSegment)//update "(*widget.HyperlinkSegm Go(*widget.HyperlinkSegment)//url! "Set *widget.HyperlinkSegment URL value" Go(*widget.HyperlinkSegment)//url? "Get *widget.HyperlinkSegment URL value" Go(*widget.HyperlinkSegment)//visual "(*widget.HyperlinkSegment).Visual" +Go(*widget.Icon)//base-widget! "Set *widget.Icon BaseWidget value" +Go(*widget.Icon)//base-widget? "Get *widget.Icon BaseWidget value" Go(*widget.Icon)//create-renderer "(*widget.Icon).CreateRenderer" +Go(*widget.Icon)//extend-base-widget "(*widget.Icon).ExtendBaseWidget" +Go(*widget.Icon)//hidden! "Set *widget.Icon Hidden value" +Go(*widget.Icon)//hidden? "Get *widget.Icon Hidden value" +Go(*widget.Icon)//hide "(*widget.Icon).Hide" Go(*widget.Icon)//min-size "(*widget.Icon).MinSize" +Go(*widget.Icon)//move "(*widget.Icon).Move" +Go(*widget.Icon)//position "(*widget.Icon).Position" +Go(*widget.Icon)//refresh "(*widget.Icon).Refresh" +Go(*widget.Icon)//resize "(*widget.Icon).Resize" Go(*widget.Icon)//resource! "Set *widget.Icon Resource value" Go(*widget.Icon)//resource? "Get *widget.Icon Resource value" Go(*widget.Icon)//set-resource "(*widget.Icon).SetResource" +Go(*widget.Icon)//show "(*widget.Icon).Show" +Go(*widget.Icon)//size "(*widget.Icon).Size" +Go(*widget.Icon)//theme "(*widget.Icon).Theme" +Go(*widget.Icon)//visible "(*widget.Icon).Visible" Go(*widget.ImageSegment)//alignment! "Set *widget.ImageSegment Alignment value" Go(*widget.ImageSegment)//alignment? "Get *widget.ImageSegment Alignment value" Go(*widget.ImageSegment)//inline "(*widget.ImageSegment).Inline" @@ -847,38 +1142,59 @@ Go(*widget.ImageSegment)//update "(*widget.ImageSegment) Go(*widget.ImageSegment)//visual "(*widget.ImageSegment).Visual" Go(*widget.Label)//alignment! "Set *widget.Label Alignment value" Go(*widget.Label)//alignment? "Get *widget.Label Alignment value" +Go(*widget.Label)//base-widget! "Set *widget.Label BaseWidget value" +Go(*widget.Label)//base-widget? "Get *widget.Label BaseWidget value" Go(*widget.Label)//bind "(*widget.Label).Bind" Go(*widget.Label)//create-renderer "(*widget.Label).CreateRenderer" +Go(*widget.Label)//extend-base-widget "(*widget.Label).ExtendBaseWidget" +Go(*widget.Label)//hidden! "Set *widget.Label Hidden value" +Go(*widget.Label)//hidden? "Get *widget.Label Hidden value" +Go(*widget.Label)//hide "(*widget.Label).Hide" Go(*widget.Label)//importance! "Set *widget.Label Importance value" Go(*widget.Label)//importance? "Get *widget.Label Importance value" Go(*widget.Label)//min-size "(*widget.Label).MinSize" +Go(*widget.Label)//move "(*widget.Label).Move" +Go(*widget.Label)//position "(*widget.Label).Position" Go(*widget.Label)//refresh "(*widget.Label).Refresh" Go(*widget.Label)//resize "(*widget.Label).Resize" Go(*widget.Label)//set-text "(*widget.Label).SetText" +Go(*widget.Label)//show "(*widget.Label).Show" +Go(*widget.Label)//size "(*widget.Label).Size" Go(*widget.Label)//text! "Set *widget.Label Text value" Go(*widget.Label)//text-style! "Set *widget.Label TextStyle value" Go(*widget.Label)//text-style? "Get *widget.Label TextStyle value" Go(*widget.Label)//text? "Get *widget.Label Text value" +Go(*widget.Label)//theme "(*widget.Label).Theme" Go(*widget.Label)//truncation! "Set *widget.Label Truncation value" Go(*widget.Label)//truncation? "Get *widget.Label Truncation value" Go(*widget.Label)//unbind "(*widget.Label).Unbind" +Go(*widget.Label)//visible "(*widget.Label).Visible" Go(*widget.Label)//wrapping! "Set *widget.Label Wrapping value" Go(*widget.Label)//wrapping? "Get *widget.Label Wrapping value" +Go(*widget.List)//base-widget! "Set *widget.List BaseWidget value" +Go(*widget.List)//base-widget? "Get *widget.List BaseWidget value" Go(*widget.List)//create-item! "Set *widget.List CreateItem value" Go(*widget.List)//create-item? "Get *widget.List CreateItem value" Go(*widget.List)//create-renderer "(*widget.List).CreateRenderer" +Go(*widget.List)//extend-base-widget "(*widget.List).ExtendBaseWidget" Go(*widget.List)//focus-gained "(*widget.List).FocusGained" Go(*widget.List)//focus-lost "(*widget.List).FocusLost" Go(*widget.List)//get-scroll-offset "(*widget.List).GetScrollOffset" +Go(*widget.List)//hidden! "Set *widget.List Hidden value" +Go(*widget.List)//hidden? "Get *widget.List Hidden value" +Go(*widget.List)//hide "(*widget.List).Hide" Go(*widget.List)//hide-separators! "Set *widget.List HideSeparators value" Go(*widget.List)//hide-separators? "Get *widget.List HideSeparators value" Go(*widget.List)//length! "Set *widget.List Length value" Go(*widget.List)//length? "Get *widget.List Length value" Go(*widget.List)//min-size "(*widget.List).MinSize" +Go(*widget.List)//move "(*widget.List).Move" Go(*widget.List)//on-selected! "Set *widget.List OnSelected value" Go(*widget.List)//on-selected? "Get *widget.List OnSelected value" Go(*widget.List)//on-unselected! "Set *widget.List OnUnselected value" Go(*widget.List)//on-unselected? "Get *widget.List OnUnselected value" +Go(*widget.List)//position "(*widget.List).Position" +Go(*widget.List)//refresh "(*widget.List).Refresh" Go(*widget.List)//refresh-item "(*widget.List).RefreshItem" Go(*widget.List)//resize "(*widget.List).Resize" Go(*widget.List)//scroll-to "(*widget.List).ScrollTo" @@ -887,12 +1203,16 @@ Go(*widget.List)//scroll-to-offset "(*widget.List).ScrollT Go(*widget.List)//scroll-to-top "(*widget.List).ScrollToTop" Go(*widget.List)//select "(*widget.List).Select" Go(*widget.List)//set-item-height "(*widget.List).SetItemHeight" +Go(*widget.List)//show "(*widget.List).Show" +Go(*widget.List)//size "(*widget.List).Size" +Go(*widget.List)//theme "(*widget.List).Theme" Go(*widget.List)//typed-key "(*widget.List).TypedKey" Go(*widget.List)//typed-rune "(*widget.List).TypedRune" Go(*widget.List)//unselect "(*widget.List).Unselect" Go(*widget.List)//unselect-all "(*widget.List).UnselectAll" Go(*widget.List)//update-item! "Set *widget.List UpdateItem value" Go(*widget.List)//update-item? "Get *widget.List UpdateItem value" +Go(*widget.List)//visible "(*widget.List).Visible" Go(*widget.ListSegment)//inline "(*widget.ListSegment).Inline" Go(*widget.ListSegment)//items! "Set *widget.ListSegment Items value" Go(*widget.ListSegment)//items? "Get *widget.ListSegment Items value" @@ -908,18 +1228,31 @@ Go(*widget.ListSegment)//visual "(*widget.ListSegment). Go(*widget.Menu)//activate-last-submenu "(*widget.Menu).ActivateLastSubmenu" Go(*widget.Menu)//activate-next "(*widget.Menu).ActivateNext" Go(*widget.Menu)//activate-previous "(*widget.Menu).ActivatePrevious" +Go(*widget.Menu)//base-widget! "Set *widget.Menu BaseWidget value" +Go(*widget.Menu)//base-widget? "Get *widget.Menu BaseWidget value" Go(*widget.Menu)//create-renderer "(*widget.Menu).CreateRenderer" Go(*widget.Menu)//deactivate-child "(*widget.Menu).DeactivateChild" Go(*widget.Menu)//deactivate-last-submenu "(*widget.Menu).DeactivateLastSubmenu" Go(*widget.Menu)//dismiss "(*widget.Menu).Dismiss" +Go(*widget.Menu)//extend-base-widget "(*widget.Menu).ExtendBaseWidget" +Go(*widget.Menu)//hidden! "Set *widget.Menu Hidden value" +Go(*widget.Menu)//hidden? "Get *widget.Menu Hidden value" +Go(*widget.Menu)//hide "(*widget.Menu).Hide" Go(*widget.Menu)//items! "Set *widget.Menu Items value" Go(*widget.Menu)//items? "Get *widget.Menu Items value" Go(*widget.Menu)//min-size "(*widget.Menu).MinSize" +Go(*widget.Menu)//move "(*widget.Menu).Move" Go(*widget.Menu)//on-dismiss! "Set *widget.Menu OnDismiss value" Go(*widget.Menu)//on-dismiss? "Get *widget.Menu OnDismiss value" +Go(*widget.Menu)//position "(*widget.Menu).Position" Go(*widget.Menu)//refresh "(*widget.Menu).Refresh" +Go(*widget.Menu)//resize "(*widget.Menu).Resize" +Go(*widget.Menu)//show "(*widget.Menu).Show" +Go(*widget.Menu)//size "(*widget.Menu).Size" Go(*widget.Menu)//tapped "(*widget.Menu).Tapped" +Go(*widget.Menu)//theme "(*widget.Menu).Theme" Go(*widget.Menu)//trigger-last "(*widget.Menu).TriggerLast" +Go(*widget.Menu)//visible "(*widget.Menu).Visible" Go(*widget.ParagraphSegment)//inline "(*widget.ParagraphSegment).Inline" Go(*widget.ParagraphSegment)//segments "(*widget.ParagraphSegment).Segments" Go(*widget.ParagraphSegment)//select "(*widget.ParagraphSegment).Select" @@ -930,96 +1263,168 @@ Go(*widget.ParagraphSegment)//textual "(*widget.ParagraphSegm Go(*widget.ParagraphSegment)//unselect "(*widget.ParagraphSegment).Unselect" Go(*widget.ParagraphSegment)//update "(*widget.ParagraphSegment).Update" Go(*widget.ParagraphSegment)//visual "(*widget.ParagraphSegment).Visual" +Go(*widget.PopUp)//base-widget! "Set *widget.PopUp BaseWidget value" +Go(*widget.PopUp)//base-widget? "Get *widget.PopUp BaseWidget value" Go(*widget.PopUp)//canvas! "Set *widget.PopUp Canvas value" Go(*widget.PopUp)//canvas? "Get *widget.PopUp Canvas value" Go(*widget.PopUp)//content! "Set *widget.PopUp Content value" Go(*widget.PopUp)//content? "Get *widget.PopUp Content value" Go(*widget.PopUp)//create-renderer "(*widget.PopUp).CreateRenderer" +Go(*widget.PopUp)//extend-base-widget "(*widget.PopUp).ExtendBaseWidget" +Go(*widget.PopUp)//hidden! "Set *widget.PopUp Hidden value" +Go(*widget.PopUp)//hidden? "Get *widget.PopUp Hidden value" Go(*widget.PopUp)//hide "(*widget.PopUp).Hide" Go(*widget.PopUp)//min-size "(*widget.PopUp).MinSize" Go(*widget.PopUp)//move "(*widget.PopUp).Move" +Go(*widget.PopUp)//position "(*widget.PopUp).Position" +Go(*widget.PopUp)//refresh "(*widget.PopUp).Refresh" Go(*widget.PopUp)//resize "(*widget.PopUp).Resize" Go(*widget.PopUp)//show "(*widget.PopUp).Show" Go(*widget.PopUp)//show-at-position "(*widget.PopUp).ShowAtPosition" Go(*widget.PopUp)//show-at-relative-position "(*widget.PopUp).ShowAtRelativePosition" +Go(*widget.PopUp)//size "(*widget.PopUp).Size" Go(*widget.PopUp)//tapped "(*widget.PopUp).Tapped" Go(*widget.PopUp)//tapped-secondary "(*widget.PopUp).TappedSecondary" +Go(*widget.PopUp)//theme "(*widget.PopUp).Theme" +Go(*widget.PopUp)//visible "(*widget.PopUp).Visible" Go(*widget.PopUpMenu)//activate-last-submenu "(*widget.PopUpMenu).ActivateLastSubmenu" Go(*widget.PopUpMenu)//activate-next "(*widget.PopUpMenu).ActivateNext" Go(*widget.PopUpMenu)//activate-previous "(*widget.PopUpMenu).ActivatePrevious" +Go(*widget.PopUpMenu)//base-widget! "Set *widget.PopUpMenu BaseWidget value" +Go(*widget.PopUpMenu)//base-widget? "Get *widget.PopUpMenu BaseWidget value" Go(*widget.PopUpMenu)//create-renderer "(*widget.PopUpMenu).CreateRenderer" Go(*widget.PopUpMenu)//deactivate-child "(*widget.PopUpMenu).DeactivateChild" Go(*widget.PopUpMenu)//deactivate-last-submenu "(*widget.PopUpMenu).DeactivateLastSubmenu" Go(*widget.PopUpMenu)//dismiss "(*widget.PopUpMenu).Dismiss" +Go(*widget.PopUpMenu)//extend-base-widget "(*widget.PopUpMenu).ExtendBaseWidget" Go(*widget.PopUpMenu)//focus-gained "(*widget.PopUpMenu).FocusGained" Go(*widget.PopUpMenu)//focus-lost "(*widget.PopUpMenu).FocusLost" +Go(*widget.PopUpMenu)//hidden! "Set *widget.PopUpMenu Hidden value" +Go(*widget.PopUpMenu)//hidden? "Get *widget.PopUpMenu Hidden value" Go(*widget.PopUpMenu)//hide "(*widget.PopUpMenu).Hide" Go(*widget.PopUpMenu)//items! "Set *widget.PopUpMenu Items value" Go(*widget.PopUpMenu)//items? "Get *widget.PopUpMenu Items value" +Go(*widget.PopUpMenu)//menu! "Set *widget.PopUpMenu Menu value" +Go(*widget.PopUpMenu)//menu? "Get *widget.PopUpMenu Menu value" Go(*widget.PopUpMenu)//min-size "(*widget.PopUpMenu).MinSize" Go(*widget.PopUpMenu)//move "(*widget.PopUpMenu).Move" Go(*widget.PopUpMenu)//on-dismiss! "Set *widget.PopUpMenu OnDismiss value" Go(*widget.PopUpMenu)//on-dismiss? "Get *widget.PopUpMenu OnDismiss value" +Go(*widget.PopUpMenu)//position "(*widget.PopUpMenu).Position" Go(*widget.PopUpMenu)//refresh "(*widget.PopUpMenu).Refresh" Go(*widget.PopUpMenu)//resize "(*widget.PopUpMenu).Resize" Go(*widget.PopUpMenu)//show "(*widget.PopUpMenu).Show" Go(*widget.PopUpMenu)//show-at-position "(*widget.PopUpMenu).ShowAtPosition" Go(*widget.PopUpMenu)//show-at-relative-position "(*widget.PopUpMenu).ShowAtRelativePosition" +Go(*widget.PopUpMenu)//size "(*widget.PopUpMenu).Size" Go(*widget.PopUpMenu)//tapped "(*widget.PopUpMenu).Tapped" +Go(*widget.PopUpMenu)//theme "(*widget.PopUpMenu).Theme" Go(*widget.PopUpMenu)//trigger-last "(*widget.PopUpMenu).TriggerLast" Go(*widget.PopUpMenu)//typed-key "(*widget.PopUpMenu).TypedKey" Go(*widget.PopUpMenu)//typed-rune "(*widget.PopUpMenu).TypedRune" +Go(*widget.PopUpMenu)//visible "(*widget.PopUpMenu).Visible" +Go(*widget.ProgressBar)//base-widget! "Set *widget.ProgressBar BaseWidget value" +Go(*widget.ProgressBar)//base-widget? "Get *widget.ProgressBar BaseWidget value" Go(*widget.ProgressBar)//bind "(*widget.ProgressBar).Bind" Go(*widget.ProgressBar)//create-renderer "(*widget.ProgressBar).CreateRenderer" +Go(*widget.ProgressBar)//extend-base-widget "(*widget.ProgressBar).ExtendBaseWidget" +Go(*widget.ProgressBar)//hidden! "Set *widget.ProgressBar Hidden value" +Go(*widget.ProgressBar)//hidden? "Get *widget.ProgressBar Hidden value" +Go(*widget.ProgressBar)//hide "(*widget.ProgressBar).Hide" Go(*widget.ProgressBar)//max! "Set *widget.ProgressBar Max value" Go(*widget.ProgressBar)//max? "Get *widget.ProgressBar Max value" Go(*widget.ProgressBar)//min! "Set *widget.ProgressBar Min value" Go(*widget.ProgressBar)//min-size "(*widget.ProgressBar).MinSize" Go(*widget.ProgressBar)//min? "Get *widget.ProgressBar Min value" +Go(*widget.ProgressBar)//move "(*widget.ProgressBar).Move" +Go(*widget.ProgressBar)//position "(*widget.ProgressBar).Position" +Go(*widget.ProgressBar)//refresh "(*widget.ProgressBar).Refresh" +Go(*widget.ProgressBar)//resize "(*widget.ProgressBar).Resize" Go(*widget.ProgressBar)//set-value "(*widget.ProgressBar).SetValue" +Go(*widget.ProgressBar)//show "(*widget.ProgressBar).Show" +Go(*widget.ProgressBar)//size "(*widget.ProgressBar).Size" Go(*widget.ProgressBar)//text-formatter! "Set *widget.ProgressBar TextFormatter value" Go(*widget.ProgressBar)//text-formatter? "Get *widget.ProgressBar TextFormatter value" +Go(*widget.ProgressBar)//theme "(*widget.ProgressBar).Theme" Go(*widget.ProgressBar)//unbind "(*widget.ProgressBar).Unbind" Go(*widget.ProgressBar)//value! "Set *widget.ProgressBar Value value" Go(*widget.ProgressBar)//value? "Get *widget.ProgressBar Value value" +Go(*widget.ProgressBar)//visible "(*widget.ProgressBar).Visible" +Go(*widget.ProgressBarInfinite)//base-widget! "Set *widget.ProgressBarInfinite BaseWidget value" +Go(*widget.ProgressBarInfinite)//base-widget? "Get *widget.ProgressBarInfinite BaseWidget value" Go(*widget.ProgressBarInfinite)//create-renderer "(*widget.ProgressBarInfinite).CreateRenderer" +Go(*widget.ProgressBarInfinite)//extend-base-widget "(*widget.ProgressBarInfinite).ExtendBaseWidget" +Go(*widget.ProgressBarInfinite)//hidden! "Set *widget.ProgressBarInfinite Hidden value" +Go(*widget.ProgressBarInfinite)//hidden? "Get *widget.ProgressBarInfinite Hidden value" Go(*widget.ProgressBarInfinite)//hide "(*widget.ProgressBarInfinite).Hide" Go(*widget.ProgressBarInfinite)//min-size "(*widget.ProgressBarInfinite).MinSize" +Go(*widget.ProgressBarInfinite)//move "(*widget.ProgressBarInfinite).Move" +Go(*widget.ProgressBarInfinite)//position "(*widget.ProgressBarInfinite).Position" +Go(*widget.ProgressBarInfinite)//refresh "(*widget.ProgressBarInfinite).Refresh" +Go(*widget.ProgressBarInfinite)//resize "(*widget.ProgressBarInfinite).Resize" Go(*widget.ProgressBarInfinite)//running "(*widget.ProgressBarInfinite).Running" Go(*widget.ProgressBarInfinite)//show "(*widget.ProgressBarInfinite).Show" +Go(*widget.ProgressBarInfinite)//size "(*widget.ProgressBarInfinite).Size" Go(*widget.ProgressBarInfinite)//start "(*widget.ProgressBarInfinite).Start" Go(*widget.ProgressBarInfinite)//stop "(*widget.ProgressBarInfinite).Stop" +Go(*widget.ProgressBarInfinite)//theme "(*widget.ProgressBarInfinite).Theme" +Go(*widget.ProgressBarInfinite)//visible "(*widget.ProgressBarInfinite).Visible" Go(*widget.RadioGroup)//append "(*widget.RadioGroup).Append" +Go(*widget.RadioGroup)//base-widget! "Set *widget.RadioGroup BaseWidget value" +Go(*widget.RadioGroup)//base-widget? "Get *widget.RadioGroup BaseWidget value" Go(*widget.RadioGroup)//create-renderer "(*widget.RadioGroup).CreateRenderer" Go(*widget.RadioGroup)//disable "(*widget.RadioGroup).Disable" +Go(*widget.RadioGroup)//disableable-widget! "Set *widget.RadioGroup DisableableWidget value" +Go(*widget.RadioGroup)//disableable-widget? "Get *widget.RadioGroup DisableableWidget value" Go(*widget.RadioGroup)//disabled "(*widget.RadioGroup).Disabled" Go(*widget.RadioGroup)//enable "(*widget.RadioGroup).Enable" +Go(*widget.RadioGroup)//extend-base-widget "(*widget.RadioGroup).ExtendBaseWidget" +Go(*widget.RadioGroup)//hidden! "Set *widget.RadioGroup Hidden value" +Go(*widget.RadioGroup)//hidden? "Get *widget.RadioGroup Hidden value" +Go(*widget.RadioGroup)//hide "(*widget.RadioGroup).Hide" Go(*widget.RadioGroup)//horizontal! "Set *widget.RadioGroup Horizontal value" Go(*widget.RadioGroup)//horizontal? "Get *widget.RadioGroup Horizontal value" Go(*widget.RadioGroup)//min-size "(*widget.RadioGroup).MinSize" +Go(*widget.RadioGroup)//move "(*widget.RadioGroup).Move" Go(*widget.RadioGroup)//on-changed! "Set *widget.RadioGroup OnChanged value" Go(*widget.RadioGroup)//on-changed? "Get *widget.RadioGroup OnChanged value" Go(*widget.RadioGroup)//options! "Set *widget.RadioGroup Options value" Go(*widget.RadioGroup)//options? "Get *widget.RadioGroup Options value" +Go(*widget.RadioGroup)//position "(*widget.RadioGroup).Position" Go(*widget.RadioGroup)//refresh "(*widget.RadioGroup).Refresh" Go(*widget.RadioGroup)//required! "Set *widget.RadioGroup Required value" Go(*widget.RadioGroup)//required? "Get *widget.RadioGroup Required value" +Go(*widget.RadioGroup)//resize "(*widget.RadioGroup).Resize" Go(*widget.RadioGroup)//selected! "Set *widget.RadioGroup Selected value" Go(*widget.RadioGroup)//selected? "Get *widget.RadioGroup Selected value" Go(*widget.RadioGroup)//set-selected "(*widget.RadioGroup).SetSelected" +Go(*widget.RadioGroup)//show "(*widget.RadioGroup).Show" +Go(*widget.RadioGroup)//size "(*widget.RadioGroup).Size" +Go(*widget.RadioGroup)//theme "(*widget.RadioGroup).Theme" +Go(*widget.RadioGroup)//visible "(*widget.RadioGroup).Visible" Go(*widget.RichText)//append-markdown "(*widget.RichText).AppendMarkdown" +Go(*widget.RichText)//base-widget! "Set *widget.RichText BaseWidget value" +Go(*widget.RichText)//base-widget? "Get *widget.RichText BaseWidget value" Go(*widget.RichText)//create-renderer "(*widget.RichText).CreateRenderer" +Go(*widget.RichText)//extend-base-widget "(*widget.RichText).ExtendBaseWidget" +Go(*widget.RichText)//hidden! "Set *widget.RichText Hidden value" +Go(*widget.RichText)//hidden? "Get *widget.RichText Hidden value" +Go(*widget.RichText)//hide "(*widget.RichText).Hide" Go(*widget.RichText)//min-size "(*widget.RichText).MinSize" +Go(*widget.RichText)//move "(*widget.RichText).Move" Go(*widget.RichText)//parse-markdown "(*widget.RichText).ParseMarkdown" +Go(*widget.RichText)//position "(*widget.RichText).Position" Go(*widget.RichText)//refresh "(*widget.RichText).Refresh" Go(*widget.RichText)//resize "(*widget.RichText).Resize" -Go(*widget.RichText)//scroll! "Set *widget.RichText Scroll value" -Go(*widget.RichText)//scroll? "Get *widget.RichText Scroll value" Go(*widget.RichText)//segments! "Set *widget.RichText Segments value" Go(*widget.RichText)//segments? "Get *widget.RichText Segments value" +Go(*widget.RichText)//show "(*widget.RichText).Show" +Go(*widget.RichText)//size "(*widget.RichText).Size" Go(*widget.RichText)//string "(*widget.RichText).String" +Go(*widget.RichText)//theme "(*widget.RichText).Theme" Go(*widget.RichText)//truncation! "Set *widget.RichText Truncation value" Go(*widget.RichText)//truncation? "Get *widget.RichText Truncation value" +Go(*widget.RichText)//visible "(*widget.RichText).Visible" Go(*widget.RichText)//wrapping! "Set *widget.RichText Wrapping value" Go(*widget.RichText)//wrapping? "Get *widget.RichText Wrapping value" Go(*widget.RichTextStyle)//alignment! "Set *widget.RichTextStyle Alignment value" @@ -1034,13 +1439,20 @@ Go(*widget.RichTextStyle)//text-style! "Set *widget.RichTextSt Go(*widget.RichTextStyle)//text-style? "Get *widget.RichTextStyle TextStyle value" Go(*widget.Select)//alignment! "Set *widget.Select Alignment value" Go(*widget.Select)//alignment? "Get *widget.Select Alignment value" +Go(*widget.Select)//base-widget! "Set *widget.Select BaseWidget value" +Go(*widget.Select)//base-widget? "Get *widget.Select BaseWidget value" Go(*widget.Select)//clear-selected "(*widget.Select).ClearSelected" Go(*widget.Select)//create-renderer "(*widget.Select).CreateRenderer" Go(*widget.Select)//disable "(*widget.Select).Disable" +Go(*widget.Select)//disableable-widget! "Set *widget.Select DisableableWidget value" +Go(*widget.Select)//disableable-widget? "Get *widget.Select DisableableWidget value" Go(*widget.Select)//disabled "(*widget.Select).Disabled" Go(*widget.Select)//enable "(*widget.Select).Enable" +Go(*widget.Select)//extend-base-widget "(*widget.Select).ExtendBaseWidget" Go(*widget.Select)//focus-gained "(*widget.Select).FocusGained" Go(*widget.Select)//focus-lost "(*widget.Select).FocusLost" +Go(*widget.Select)//hidden! "Set *widget.Select Hidden value" +Go(*widget.Select)//hidden? "Get *widget.Select Hidden value" Go(*widget.Select)//hide "(*widget.Select).Hide" Go(*widget.Select)//min-size "(*widget.Select).MinSize" Go(*widget.Select)//mouse-in "(*widget.Select).MouseIn" @@ -1053,6 +1465,8 @@ Go(*widget.Select)//options! "Set *widget.Select Opt Go(*widget.Select)//options? "Get *widget.Select Options value" Go(*widget.Select)//place-holder! "Set *widget.Select PlaceHolder value" Go(*widget.Select)//place-holder? "Get *widget.Select PlaceHolder value" +Go(*widget.Select)//position "(*widget.Select).Position" +Go(*widget.Select)//refresh "(*widget.Select).Refresh" Go(*widget.Select)//resize "(*widget.Select).Resize" Go(*widget.Select)//selected! "Set *widget.Select Selected value" Go(*widget.Select)//selected-index "(*widget.Select).SelectedIndex" @@ -1060,13 +1474,19 @@ Go(*widget.Select)//selected? "Get *widget.Select Sel Go(*widget.Select)//set-options "(*widget.Select).SetOptions" Go(*widget.Select)//set-selected "(*widget.Select).SetSelected" Go(*widget.Select)//set-selected-index "(*widget.Select).SetSelectedIndex" +Go(*widget.Select)//show "(*widget.Select).Show" +Go(*widget.Select)//size "(*widget.Select).Size" Go(*widget.Select)//tapped "(*widget.Select).Tapped" +Go(*widget.Select)//theme "(*widget.Select).Theme" Go(*widget.Select)//typed-key "(*widget.Select).TypedKey" Go(*widget.Select)//typed-rune "(*widget.Select).TypedRune" +Go(*widget.Select)//visible "(*widget.Select).Visible" Go(*widget.SelectEntry)//accepts-tab "(*widget.SelectEntry).AcceptsTab" Go(*widget.SelectEntry)//action-item! "Set *widget.SelectEntry ActionItem value" Go(*widget.SelectEntry)//action-item? "Get *widget.SelectEntry ActionItem value" Go(*widget.SelectEntry)//append "(*widget.SelectEntry).Append" +Go(*widget.SelectEntry)//base-widget! "Set *widget.SelectEntry BaseWidget value" +Go(*widget.SelectEntry)//base-widget? "Get *widget.SelectEntry BaseWidget value" Go(*widget.SelectEntry)//bind "(*widget.SelectEntry).Bind" Go(*widget.SelectEntry)//create-renderer "(*widget.SelectEntry).CreateRenderer" Go(*widget.SelectEntry)//cursor "(*widget.SelectEntry).Cursor" @@ -1075,14 +1495,20 @@ Go(*widget.SelectEntry)//cursor-column? "Get *widget.SelectEntr Go(*widget.SelectEntry)//cursor-row! "Set *widget.SelectEntry CursorRow value" Go(*widget.SelectEntry)//cursor-row? "Get *widget.SelectEntry CursorRow value" Go(*widget.SelectEntry)//disable "(*widget.SelectEntry).Disable" +Go(*widget.SelectEntry)//disableable-widget! "Set *widget.SelectEntry DisableableWidget value" +Go(*widget.SelectEntry)//disableable-widget? "Get *widget.SelectEntry DisableableWidget value" Go(*widget.SelectEntry)//disabled "(*widget.SelectEntry).Disabled" Go(*widget.SelectEntry)//double-tapped "(*widget.SelectEntry).DoubleTapped" Go(*widget.SelectEntry)//drag-end "(*widget.SelectEntry).DragEnd" Go(*widget.SelectEntry)//dragged "(*widget.SelectEntry).Dragged" Go(*widget.SelectEntry)//enable "(*widget.SelectEntry).Enable" +Go(*widget.SelectEntry)//entry! "Set *widget.SelectEntry Entry value" +Go(*widget.SelectEntry)//entry? "Get *widget.SelectEntry Entry value" Go(*widget.SelectEntry)//extend-base-widget "(*widget.SelectEntry).ExtendBaseWidget" Go(*widget.SelectEntry)//focus-gained "(*widget.SelectEntry).FocusGained" Go(*widget.SelectEntry)//focus-lost "(*widget.SelectEntry).FocusLost" +Go(*widget.SelectEntry)//hidden! "Set *widget.SelectEntry Hidden value" +Go(*widget.SelectEntry)//hidden? "Get *widget.SelectEntry Hidden value" Go(*widget.SelectEntry)//hide "(*widget.SelectEntry).Hide" Go(*widget.SelectEntry)//key-down "(*widget.SelectEntry).KeyDown" Go(*widget.SelectEntry)//key-up "(*widget.SelectEntry).KeyUp" @@ -1103,11 +1529,10 @@ Go(*widget.SelectEntry)//password! "Set *widget.SelectEntr Go(*widget.SelectEntry)//password? "Get *widget.SelectEntry Password value" Go(*widget.SelectEntry)//place-holder! "Set *widget.SelectEntry PlaceHolder value" Go(*widget.SelectEntry)//place-holder? "Get *widget.SelectEntry PlaceHolder value" +Go(*widget.SelectEntry)//position "(*widget.SelectEntry).Position" Go(*widget.SelectEntry)//redo "(*widget.SelectEntry).Redo" Go(*widget.SelectEntry)//refresh "(*widget.SelectEntry).Refresh" Go(*widget.SelectEntry)//resize "(*widget.SelectEntry).Resize" -Go(*widget.SelectEntry)//scroll! "Set *widget.SelectEntry Scroll value" -Go(*widget.SelectEntry)//scroll? "Get *widget.SelectEntry Scroll value" Go(*widget.SelectEntry)//selected-text "(*widget.SelectEntry).SelectedText" Go(*widget.SelectEntry)//set-min-rows-visible "(*widget.SelectEntry).SetMinRowsVisible" Go(*widget.SelectEntry)//set-on-validation-changed "(*widget.SelectEntry).SetOnValidationChanged" @@ -1115,12 +1540,15 @@ Go(*widget.SelectEntry)//set-options "(*widget.SelectEntry). Go(*widget.SelectEntry)//set-place-holder "(*widget.SelectEntry).SetPlaceHolder" Go(*widget.SelectEntry)//set-text "(*widget.SelectEntry).SetText" Go(*widget.SelectEntry)//set-validation-error "(*widget.SelectEntry).SetValidationError" +Go(*widget.SelectEntry)//show "(*widget.SelectEntry).Show" +Go(*widget.SelectEntry)//size "(*widget.SelectEntry).Size" Go(*widget.SelectEntry)//tapped "(*widget.SelectEntry).Tapped" Go(*widget.SelectEntry)//tapped-secondary "(*widget.SelectEntry).TappedSecondary" Go(*widget.SelectEntry)//text! "Set *widget.SelectEntry Text value" Go(*widget.SelectEntry)//text-style! "Set *widget.SelectEntry TextStyle value" Go(*widget.SelectEntry)//text-style? "Get *widget.SelectEntry TextStyle value" Go(*widget.SelectEntry)//text? "Get *widget.SelectEntry Text value" +Go(*widget.SelectEntry)//theme "(*widget.SelectEntry).Theme" Go(*widget.SelectEntry)//touch-cancel "(*widget.SelectEntry).TouchCancel" Go(*widget.SelectEntry)//touch-down "(*widget.SelectEntry).TouchDown" Go(*widget.SelectEntry)//touch-up "(*widget.SelectEntry).TouchUp" @@ -1132,10 +1560,25 @@ Go(*widget.SelectEntry)//undo "(*widget.SelectEntry). Go(*widget.SelectEntry)//validate "(*widget.SelectEntry).Validate" Go(*widget.SelectEntry)//validator! "Set *widget.SelectEntry Validator value" Go(*widget.SelectEntry)//validator? "Get *widget.SelectEntry Validator value" +Go(*widget.SelectEntry)//visible "(*widget.SelectEntry).Visible" Go(*widget.SelectEntry)//wrapping! "Set *widget.SelectEntry Wrapping value" Go(*widget.SelectEntry)//wrapping? "Get *widget.SelectEntry Wrapping value" +Go(*widget.Separator)//base-widget! "Set *widget.Separator BaseWidget value" +Go(*widget.Separator)//base-widget? "Get *widget.Separator BaseWidget value" Go(*widget.Separator)//create-renderer "(*widget.Separator).CreateRenderer" +Go(*widget.Separator)//extend-base-widget "(*widget.Separator).ExtendBaseWidget" +Go(*widget.Separator)//hidden! "Set *widget.Separator Hidden value" +Go(*widget.Separator)//hidden? "Get *widget.Separator Hidden value" +Go(*widget.Separator)//hide "(*widget.Separator).Hide" Go(*widget.Separator)//min-size "(*widget.Separator).MinSize" +Go(*widget.Separator)//move "(*widget.Separator).Move" +Go(*widget.Separator)//position "(*widget.Separator).Position" +Go(*widget.Separator)//refresh "(*widget.Separator).Refresh" +Go(*widget.Separator)//resize "(*widget.Separator).Resize" +Go(*widget.Separator)//show "(*widget.Separator).Show" +Go(*widget.Separator)//size "(*widget.Separator).Size" +Go(*widget.Separator)//theme "(*widget.Separator).Theme" +Go(*widget.Separator)//visible "(*widget.Separator).Visible" Go(*widget.SeparatorSegment)//inline "(*widget.SeparatorSegment).Inline" Go(*widget.SeparatorSegment)//select "(*widget.SeparatorSegment).Select" Go(*widget.SeparatorSegment)//selected-text "(*widget.SeparatorSegment).SelectedText" @@ -1143,6 +1586,8 @@ Go(*widget.SeparatorSegment)//textual "(*widget.SeparatorSegm Go(*widget.SeparatorSegment)//unselect "(*widget.SeparatorSegment).Unselect" Go(*widget.SeparatorSegment)//update "(*widget.SeparatorSegment).Update" Go(*widget.SeparatorSegment)//visual "(*widget.SeparatorSegment).Visual" +Go(*widget.Slider)//base-widget! "Set *widget.Slider BaseWidget value" +Go(*widget.Slider)//base-widget? "Get *widget.Slider BaseWidget value" Go(*widget.Slider)//bind "(*widget.Slider).Bind" Go(*widget.Slider)//create-renderer "(*widget.Slider).CreateRenderer" Go(*widget.Slider)//disable "(*widget.Slider).Disable" @@ -1150,8 +1595,12 @@ Go(*widget.Slider)//disabled "(*widget.Slider).Disab Go(*widget.Slider)//drag-end "(*widget.Slider).DragEnd" Go(*widget.Slider)//dragged "(*widget.Slider).Dragged" Go(*widget.Slider)//enable "(*widget.Slider).Enable" +Go(*widget.Slider)//extend-base-widget "(*widget.Slider).ExtendBaseWidget" Go(*widget.Slider)//focus-gained "(*widget.Slider).FocusGained" Go(*widget.Slider)//focus-lost "(*widget.Slider).FocusLost" +Go(*widget.Slider)//hidden! "Set *widget.Slider Hidden value" +Go(*widget.Slider)//hidden? "Get *widget.Slider Hidden value" +Go(*widget.Slider)//hide "(*widget.Slider).Hide" Go(*widget.Slider)//max! "Set *widget.Slider Max value" Go(*widget.Slider)//max? "Get *widget.Slider Max value" Go(*widget.Slider)//min! "Set *widget.Slider Min value" @@ -1160,21 +1609,31 @@ Go(*widget.Slider)//min? "Get *widget.Slider Min Go(*widget.Slider)//mouse-in "(*widget.Slider).MouseIn" Go(*widget.Slider)//mouse-moved "(*widget.Slider).MouseMoved" Go(*widget.Slider)//mouse-out "(*widget.Slider).MouseOut" +Go(*widget.Slider)//move "(*widget.Slider).Move" Go(*widget.Slider)//on-change-ended! "Set *widget.Slider OnChangeEnded value" Go(*widget.Slider)//on-change-ended? "Get *widget.Slider OnChangeEnded value" Go(*widget.Slider)//on-changed! "Set *widget.Slider OnChanged value" Go(*widget.Slider)//on-changed? "Get *widget.Slider OnChanged value" Go(*widget.Slider)//orientation! "Set *widget.Slider Orientation value" Go(*widget.Slider)//orientation? "Get *widget.Slider Orientation value" +Go(*widget.Slider)//position "(*widget.Slider).Position" +Go(*widget.Slider)//refresh "(*widget.Slider).Refresh" +Go(*widget.Slider)//resize "(*widget.Slider).Resize" Go(*widget.Slider)//set-value "(*widget.Slider).SetValue" +Go(*widget.Slider)//show "(*widget.Slider).Show" +Go(*widget.Slider)//size "(*widget.Slider).Size" Go(*widget.Slider)//step! "Set *widget.Slider Step value" Go(*widget.Slider)//step? "Get *widget.Slider Step value" Go(*widget.Slider)//tapped "(*widget.Slider).Tapped" +Go(*widget.Slider)//theme "(*widget.Slider).Theme" Go(*widget.Slider)//typed-key "(*widget.Slider).TypedKey" Go(*widget.Slider)//typed-rune "(*widget.Slider).TypedRune" Go(*widget.Slider)//unbind "(*widget.Slider).Unbind" Go(*widget.Slider)//value! "Set *widget.Slider Value value" Go(*widget.Slider)//value? "Get *widget.Slider Value value" +Go(*widget.Slider)//visible "(*widget.Slider).Visible" +Go(*widget.Table)//base-widget! "Set *widget.Table BaseWidget value" +Go(*widget.Table)//base-widget? "Get *widget.Table BaseWidget value" Go(*widget.Table)//create-cell! "Set *widget.Table CreateCell value" Go(*widget.Table)//create-cell? "Get *widget.Table CreateCell value" Go(*widget.Table)//create-header! "Set *widget.Table CreateHeader value" @@ -1183,22 +1642,31 @@ Go(*widget.Table)//create-renderer "(*widget.Table).Create Go(*widget.Table)//cursor "(*widget.Table).Cursor" Go(*widget.Table)//drag-end "(*widget.Table).DragEnd" Go(*widget.Table)//dragged "(*widget.Table).Dragged" +Go(*widget.Table)//extend-base-widget "(*widget.Table).ExtendBaseWidget" Go(*widget.Table)//focus-gained "(*widget.Table).FocusGained" Go(*widget.Table)//focus-lost "(*widget.Table).FocusLost" +Go(*widget.Table)//hidden! "Set *widget.Table Hidden value" +Go(*widget.Table)//hidden? "Get *widget.Table Hidden value" +Go(*widget.Table)//hide "(*widget.Table).Hide" Go(*widget.Table)//hide-separators! "Set *widget.Table HideSeparators value" Go(*widget.Table)//hide-separators? "Get *widget.Table HideSeparators value" Go(*widget.Table)//length! "Set *widget.Table Length value" Go(*widget.Table)//length? "Get *widget.Table Length value" +Go(*widget.Table)//min-size "(*widget.Table).MinSize" Go(*widget.Table)//mouse-down "(*widget.Table).MouseDown" Go(*widget.Table)//mouse-in "(*widget.Table).MouseIn" Go(*widget.Table)//mouse-moved "(*widget.Table).MouseMoved" Go(*widget.Table)//mouse-out "(*widget.Table).MouseOut" Go(*widget.Table)//mouse-up "(*widget.Table).MouseUp" +Go(*widget.Table)//move "(*widget.Table).Move" Go(*widget.Table)//on-selected! "Set *widget.Table OnSelected value" Go(*widget.Table)//on-selected? "Get *widget.Table OnSelected value" Go(*widget.Table)//on-unselected! "Set *widget.Table OnUnselected value" Go(*widget.Table)//on-unselected? "Get *widget.Table OnUnselected value" +Go(*widget.Table)//position "(*widget.Table).Position" +Go(*widget.Table)//refresh "(*widget.Table).Refresh" Go(*widget.Table)//refresh-item "(*widget.Table).RefreshItem" +Go(*widget.Table)//resize "(*widget.Table).Resize" Go(*widget.Table)//scroll-to "(*widget.Table).ScrollTo" Go(*widget.Table)//scroll-to-bottom "(*widget.Table).ScrollToBottom" Go(*widget.Table)//scroll-to-leading "(*widget.Table).ScrollToLeading" @@ -1207,15 +1675,18 @@ Go(*widget.Table)//scroll-to-trailing "(*widget.Table).Scroll Go(*widget.Table)//select "(*widget.Table).Select" Go(*widget.Table)//set-column-width "(*widget.Table).SetColumnWidth" Go(*widget.Table)//set-row-height "(*widget.Table).SetRowHeight" +Go(*widget.Table)//show "(*widget.Table).Show" Go(*widget.Table)//show-header-column! "Set *widget.Table ShowHeaderColumn value" Go(*widget.Table)//show-header-column? "Get *widget.Table ShowHeaderColumn value" Go(*widget.Table)//show-header-row! "Set *widget.Table ShowHeaderRow value" Go(*widget.Table)//show-header-row? "Get *widget.Table ShowHeaderRow value" +Go(*widget.Table)//size "(*widget.Table).Size" Go(*widget.Table)//sticky-column-count! "Set *widget.Table StickyColumnCount value" Go(*widget.Table)//sticky-column-count? "Get *widget.Table StickyColumnCount value" Go(*widget.Table)//sticky-row-count! "Set *widget.Table StickyRowCount value" Go(*widget.Table)//sticky-row-count? "Get *widget.Table StickyRowCount value" Go(*widget.Table)//tapped "(*widget.Table).Tapped" +Go(*widget.Table)//theme "(*widget.Table).Theme" Go(*widget.Table)//touch-cancel "(*widget.Table).TouchCancel" Go(*widget.Table)//touch-down "(*widget.Table).TouchDown" Go(*widget.Table)//touch-up "(*widget.Table).TouchUp" @@ -1227,12 +1698,22 @@ Go(*widget.Table)//update-cell! "Set *widget.Table Upda Go(*widget.Table)//update-cell? "Get *widget.Table UpdateCell value" Go(*widget.Table)//update-header! "Set *widget.Table UpdateHeader value" Go(*widget.Table)//update-header? "Get *widget.Table UpdateHeader value" +Go(*widget.Table)//visible "(*widget.Table).Visible" Go(*widget.TableCellID)//col! "Set *widget.TableCellID Col value" Go(*widget.TableCellID)//col? "Get *widget.TableCellID Col value" Go(*widget.TableCellID)//row! "Set *widget.TableCellID Row value" Go(*widget.TableCellID)//row? "Get *widget.TableCellID Row value" +Go(*widget.TextGrid)//base-widget! "Set *widget.TextGrid BaseWidget value" +Go(*widget.TextGrid)//base-widget? "Get *widget.TextGrid BaseWidget value" Go(*widget.TextGrid)//create-renderer "(*widget.TextGrid).CreateRenderer" +Go(*widget.TextGrid)//extend-base-widget "(*widget.TextGrid).ExtendBaseWidget" +Go(*widget.TextGrid)//hidden! "Set *widget.TextGrid Hidden value" +Go(*widget.TextGrid)//hidden? "Get *widget.TextGrid Hidden value" +Go(*widget.TextGrid)//hide "(*widget.TextGrid).Hide" Go(*widget.TextGrid)//min-size "(*widget.TextGrid).MinSize" +Go(*widget.TextGrid)//move "(*widget.TextGrid).Move" +Go(*widget.TextGrid)//position "(*widget.TextGrid).Position" +Go(*widget.TextGrid)//refresh "(*widget.TextGrid).Refresh" Go(*widget.TextGrid)//resize "(*widget.TextGrid).Resize" Go(*widget.TextGrid)//row "(*widget.TextGrid).Row" Go(*widget.TextGrid)//row-text "(*widget.TextGrid).RowText" @@ -1244,13 +1725,17 @@ Go(*widget.TextGrid)//set-row-style "(*widget.TextGrid).Set Go(*widget.TextGrid)//set-rune "(*widget.TextGrid).SetRune" Go(*widget.TextGrid)//set-style "(*widget.TextGrid).SetStyle" Go(*widget.TextGrid)//set-text "(*widget.TextGrid).SetText" +Go(*widget.TextGrid)//show "(*widget.TextGrid).Show" Go(*widget.TextGrid)//show-line-numbers! "Set *widget.TextGrid ShowLineNumbers value" Go(*widget.TextGrid)//show-line-numbers? "Get *widget.TextGrid ShowLineNumbers value" Go(*widget.TextGrid)//show-whitespace! "Set *widget.TextGrid ShowWhitespace value" Go(*widget.TextGrid)//show-whitespace? "Get *widget.TextGrid ShowWhitespace value" +Go(*widget.TextGrid)//size "(*widget.TextGrid).Size" Go(*widget.TextGrid)//tab-width! "Set *widget.TextGrid TabWidth value" Go(*widget.TextGrid)//tab-width? "Get *widget.TextGrid TabWidth value" Go(*widget.TextGrid)//text "(*widget.TextGrid).Text" +Go(*widget.TextGrid)//theme "(*widget.TextGrid).Theme" +Go(*widget.TextGrid)//visible "(*widget.TextGrid).Visible" Go(*widget.TextGridCell)//rune! "Set *widget.TextGridCell Rune value" Go(*widget.TextGridCell)//rune? "Get *widget.TextGridCell Rune value" Go(*widget.TextGridCell)//style! "Set *widget.TextGridCell Style value" @@ -1271,11 +1756,25 @@ Go(*widget.TextSegment)//unselect "(*widget.TextSegment). Go(*widget.TextSegment)//update "(*widget.TextSegment).Update" Go(*widget.TextSegment)//visual "(*widget.TextSegment).Visual" Go(*widget.Toolbar)//append "(*widget.Toolbar).Append" +Go(*widget.Toolbar)//base-widget! "Set *widget.Toolbar BaseWidget value" +Go(*widget.Toolbar)//base-widget? "Get *widget.Toolbar BaseWidget value" Go(*widget.Toolbar)//create-renderer "(*widget.Toolbar).CreateRenderer" +Go(*widget.Toolbar)//extend-base-widget "(*widget.Toolbar).ExtendBaseWidget" +Go(*widget.Toolbar)//hidden! "Set *widget.Toolbar Hidden value" +Go(*widget.Toolbar)//hidden? "Get *widget.Toolbar Hidden value" +Go(*widget.Toolbar)//hide "(*widget.Toolbar).Hide" Go(*widget.Toolbar)//items! "Set *widget.Toolbar Items value" Go(*widget.Toolbar)//items? "Get *widget.Toolbar Items value" Go(*widget.Toolbar)//min-size "(*widget.Toolbar).MinSize" +Go(*widget.Toolbar)//move "(*widget.Toolbar).Move" +Go(*widget.Toolbar)//position "(*widget.Toolbar).Position" Go(*widget.Toolbar)//prepend "(*widget.Toolbar).Prepend" +Go(*widget.Toolbar)//refresh "(*widget.Toolbar).Refresh" +Go(*widget.Toolbar)//resize "(*widget.Toolbar).Resize" +Go(*widget.Toolbar)//show "(*widget.Toolbar).Show" +Go(*widget.Toolbar)//size "(*widget.Toolbar).Size" +Go(*widget.Toolbar)//theme "(*widget.Toolbar).Theme" +Go(*widget.Toolbar)//visible "(*widget.Toolbar).Visible" Go(*widget.ToolbarAction)//disable "(*widget.ToolbarAction).Disable" Go(*widget.ToolbarAction)//disabled "(*widget.ToolbarAction).Disabled" Go(*widget.ToolbarAction)//enable "(*widget.ToolbarAction).Enable" @@ -1287,6 +1786,8 @@ Go(*widget.ToolbarAction)//set-icon "(*widget.ToolbarAction Go(*widget.ToolbarAction)//toolbar-object "(*widget.ToolbarAction).ToolbarObject" Go(*widget.ToolbarSeparator)//toolbar-object "(*widget.ToolbarSeparator).ToolbarObject" Go(*widget.ToolbarSpacer)//toolbar-object "(*widget.ToolbarSpacer).ToolbarObject" +Go(*widget.Tree)//base-widget! "Set *widget.Tree BaseWidget value" +Go(*widget.Tree)//base-widget? "Get *widget.Tree BaseWidget value" Go(*widget.Tree)//child-ui-ds! "Set *widget.Tree ChildUIDs value" Go(*widget.Tree)//child-ui-ds? "Get *widget.Tree ChildUIDs value" Go(*widget.Tree)//close-all-branches "(*widget.Tree).CloseAllBranches" @@ -1294,14 +1795,19 @@ Go(*widget.Tree)//close-branch "(*widget.Tree).CloseBr Go(*widget.Tree)//create-node! "Set *widget.Tree CreateNode value" Go(*widget.Tree)//create-node? "Get *widget.Tree CreateNode value" Go(*widget.Tree)//create-renderer "(*widget.Tree).CreateRenderer" +Go(*widget.Tree)//extend-base-widget "(*widget.Tree).ExtendBaseWidget" Go(*widget.Tree)//focus-gained "(*widget.Tree).FocusGained" Go(*widget.Tree)//focus-lost "(*widget.Tree).FocusLost" +Go(*widget.Tree)//hidden! "Set *widget.Tree Hidden value" +Go(*widget.Tree)//hidden? "Get *widget.Tree Hidden value" +Go(*widget.Tree)//hide "(*widget.Tree).Hide" Go(*widget.Tree)//hide-separators! "Set *widget.Tree HideSeparators value" Go(*widget.Tree)//hide-separators? "Get *widget.Tree HideSeparators value" Go(*widget.Tree)//is-branch! "Set *widget.Tree IsBranch value" Go(*widget.Tree)//is-branch-open "(*widget.Tree).IsBranchOpen" Go(*widget.Tree)//is-branch? "Get *widget.Tree IsBranch value" Go(*widget.Tree)//min-size "(*widget.Tree).MinSize" +Go(*widget.Tree)//move "(*widget.Tree).Move" Go(*widget.Tree)//on-branch-closed! "Set *widget.Tree OnBranchClosed value" Go(*widget.Tree)//on-branch-closed? "Get *widget.Tree OnBranchClosed value" Go(*widget.Tree)//on-branch-opened! "Set *widget.Tree OnBranchOpened value" @@ -1312,6 +1818,8 @@ Go(*widget.Tree)//on-unselected! "Set *widget.Tree OnUns Go(*widget.Tree)//on-unselected? "Get *widget.Tree OnUnselected value" Go(*widget.Tree)//open-all-branches "(*widget.Tree).OpenAllBranches" Go(*widget.Tree)//open-branch "(*widget.Tree).OpenBranch" +Go(*widget.Tree)//position "(*widget.Tree).Position" +Go(*widget.Tree)//refresh "(*widget.Tree).Refresh" Go(*widget.Tree)//refresh-item "(*widget.Tree).RefreshItem" Go(*widget.Tree)//resize "(*widget.Tree).Resize" Go(*widget.Tree)//root! "Set *widget.Tree Root value" @@ -1320,6 +1828,9 @@ Go(*widget.Tree)//scroll-to "(*widget.Tree).ScrollT Go(*widget.Tree)//scroll-to-bottom "(*widget.Tree).ScrollToBottom" Go(*widget.Tree)//scroll-to-top "(*widget.Tree).ScrollToTop" Go(*widget.Tree)//select "(*widget.Tree).Select" +Go(*widget.Tree)//show "(*widget.Tree).Show" +Go(*widget.Tree)//size "(*widget.Tree).Size" +Go(*widget.Tree)//theme "(*widget.Tree).Theme" Go(*widget.Tree)//toggle-branch "(*widget.Tree).ToggleBranch" Go(*widget.Tree)//typed-key "(*widget.Tree).TypedKey" Go(*widget.Tree)//typed-rune "(*widget.Tree).TypedRune" @@ -1327,6 +1838,7 @@ Go(*widget.Tree)//unselect "(*widget.Tree).Unselec Go(*widget.Tree)//unselect-all "(*widget.Tree).UnselectAll" Go(*widget.Tree)//update-node! "Set *widget.Tree UpdateNode value" Go(*widget.Tree)//update-node? "Get *widget.Tree UpdateNode value" +Go(*widget.Tree)//visible "(*widget.Tree).Visible" Go(binding.Bool)//add-listener "binding.Bool.AddListener" Go(binding.Bool)//get "binding.Bool.Get" Go(binding.Bool)//remove-listener "binding.Bool.RemoveListener" @@ -1891,8 +2403,6 @@ Go(fyne.CloudProvider)//provider-name "fyne.CloudProvider.Pro Go(fyne.CloudProvider)//setup "fyne.CloudProvider.Setup" Go(fyne.CloudProviderPreferences)//cloud-preferences "fyne.CloudProviderPreferences.CloudPreferences" Go(fyne.CloudProviderStorage)//cloud-storage "fyne.CloudProviderStorage.CloudStorage" -Go(fyne.Delta)//components "fyne.Delta.Components" -Go(fyne.Delta)//is-zero "fyne.Delta.IsZero" Go(fyne.Device)//has-keyboard "fyne.Device.HasKeyboard" Go(fyne.Device)//is-browser "fyne.Device.IsBrowser" Go(fyne.Device)//is-mobile "fyne.Device.IsMobile" @@ -1967,12 +2477,6 @@ Go(fyne.OverlayStack)//add "fyne.OverlayStack.Add" Go(fyne.OverlayStack)//list "fyne.OverlayStack.List" Go(fyne.OverlayStack)//remove "fyne.OverlayStack.Remove" Go(fyne.OverlayStack)//top "fyne.OverlayStack.Top" -Go(fyne.Position)//add "fyne.Position.Add" -Go(fyne.Position)//add-xy "fyne.Position.AddXY" -Go(fyne.Position)//components "fyne.Position.Components" -Go(fyne.Position)//is-zero "fyne.Position.IsZero" -Go(fyne.Position)//subtract "fyne.Position.Subtract" -Go(fyne.Position)//subtract-xy "fyne.Position.SubtractXY" Go(fyne.Preferences)//add-change-listener "fyne.Preferences.AddChangeListener" Go(fyne.Preferences)//bool "fyne.Preferences.Bool" Go(fyne.Preferences)//bool-list "fyne.Preferences.BoolList" @@ -2014,14 +2518,6 @@ Go(fyne.Settings)//theme "fyne.Settings.Theme" Go(fyne.Settings)//theme-variant "fyne.Settings.ThemeVariant" Go(fyne.Shortcut)//shortcut-name "fyne.Shortcut.ShortcutName" Go(fyne.Shortcutable)//typed-shortcut "fyne.Shortcutable.TypedShortcut" -Go(fyne.Size)//add "fyne.Size.Add" -Go(fyne.Size)//add-width-height "fyne.Size.AddWidthHeight" -Go(fyne.Size)//components "fyne.Size.Components" -Go(fyne.Size)//is-zero "fyne.Size.IsZero" -Go(fyne.Size)//max "fyne.Size.Max" -Go(fyne.Size)//min "fyne.Size.Min" -Go(fyne.Size)//subtract "fyne.Size.Subtract" -Go(fyne.Size)//subtract-width-height "fyne.Size.SubtractWidthHeight" Go(fyne.Storage)//create "fyne.Storage.Create" Go(fyne.Storage)//list "fyne.Storage.List" Go(fyne.Storage)//open "fyne.Storage.Open" @@ -2109,8 +2605,6 @@ Go(fyne.Window)//show "fyne.Window.Show" Go(fyne.Window)//show-and-run "fyne.Window.ShowAndRun" Go(fyne.Window)//title "fyne.Window.Title" Go(fyne_driver.NativeWindow)//run-native "fyne_driver.NativeWindow.RunNative" -Go(layout.CustomPaddedLayout)//layout "layout.CustomPaddedLayout.Layout" -Go(layout.CustomPaddedLayout)//min-size "layout.CustomPaddedLayout.MinSize" Go(layout.SpacerObject)//expand-horizontal "layout.SpacerObject.ExpandHorizontal" Go(layout.SpacerObject)//expand-vertical "layout.SpacerObject.ExpandVertical" Go(mobile.Device)//hide-virtual-keyboard "mobile.Device.HideVirtualKeyboard" @@ -2239,6 +2733,7 @@ binding-bind-uri-list "binding.BindURIList" binding-bind-uri-tree "binding.BindURITree" binding-bool-to-string "binding.BoolToString" binding-bool-to-string-with-format "binding.BoolToStringWithFormat" +binding-data-tree-root-id "Get binding.DataTreeRootID value" binding-float-to-int "binding.FloatToInt" binding-float-to-string "binding.FloatToString" binding-float-to-string-with-format "binding.FloatToStringWithFormat" @@ -2370,8 +2865,6 @@ desktop-pointer-cursor "Get desktop.PointerCur desktop-right-mouse-button "Get desktop.RightMouseButton value" desktop-text-cursor "Get desktop.TextCursor value" desktop-v-resize-cursor "Get desktop.VResizeCursor value" -dialog-grid-view "Get dialog.GridView value" -dialog-list-view "Get dialog.ListView value" dialog-new-color-picker "dialog.NewColorPicker" dialog-new-color-picker-dialog "Create a new dialog.ColorPickerDialog struct" dialog-new-confirm "dialog.NewConfirm" @@ -2989,6 +3482,7 @@ widget-medium-importance "Get widget.MediumImpor widget-new-accordion "widget.NewAccordion" widget-new-accordion-item "widget.NewAccordionItem" widget-new-activity "widget.NewActivity" +widget-new-base-widget "Create a new widget.BaseWidget struct" widget-new-button "widget.NewButton" widget-new-button-with-icon "widget.NewButtonWithIcon" widget-new-card "widget.NewCard" diff --git a/go.mod b/go.mod index a00afb0..d5ff83e 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ toolchain go1.23.4 replace github.com/refaktor/rye => ../rye -// replace github.com/refaktor/ryegen => ../ryegen +replace github.com/refaktor/ryegen => ../ryegen require ( fyne.io/fyne/v2 v2.5.2 diff --git a/go.sum b/go.sum index 278af3a..574a30d 100644 --- a/go.sum +++ b/go.sum @@ -429,8 +429,6 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:Om github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/refaktor/go-peg v0.0.0-20220116201714-31e3dfa8dc7d h1:FXrWUGgPRzhaZIBho8zNLSrMp0VpP8E9+wbRRnJYlbE= github.com/refaktor/go-peg v0.0.0-20220116201714-31e3dfa8dc7d/go.mod h1:iIkrsFobLIWX8kQ6Oqj4cl4nwdMSE92DWpWwk9YlG9s= -github.com/refaktor/ryegen v0.1.0 h1:g74xYZHv5vnkRn+gV3Hy/28OYqi9DrnXeZzXhNF7zTk= -github.com/refaktor/ryegen v0.1.0/go.mod h1:e0SC24+QY8gh/mI/7r6jaU6MNRfC3JcnJv1RUQDJHHY= github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM= github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk= github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=